mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
More incremental work on active schema for MySQL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
65786805ca
commit
ef214ecc40
2 changed files with 2 additions and 2 deletions
|
@ -359,7 +359,7 @@ module ActiveRecord
|
||||||
|
|
||||||
def initialize_schema_information
|
def initialize_schema_information
|
||||||
begin
|
begin
|
||||||
execute "CREATE TABLE schema_info (version #{native_database_types[:integer]})"
|
execute "CREATE TABLE schema_info (version #{native_database_types[:integer][:name]}#{native_database_types[:integer][:limit]})"
|
||||||
insert "INSERT INTO schema_info (version) VALUES(0)"
|
insert "INSERT INTO schema_info (version) VALUES(0)"
|
||||||
rescue ActiveRecord::StatementInvalid
|
rescue ActiveRecord::StatementInvalid
|
||||||
# Schema has been intialized
|
# Schema has been intialized
|
||||||
|
|
|
@ -66,7 +66,7 @@ module ActiveRecord
|
||||||
|
|
||||||
def native_database_types
|
def native_database_types
|
||||||
{
|
{
|
||||||
:primary_key => { :name => "int(11) DEFAULT NULL auto_increment PRIMARY KEY" },
|
:primary_key => "int(11) DEFAULT NULL auto_increment PRIMARY KEY",
|
||||||
:string => { :name => "varchar", :limit => 255 },
|
:string => { :name => "varchar", :limit => 255 },
|
||||||
:text => { :name => "text" },
|
:text => { :name => "text" },
|
||||||
:integer => { :name => "int", :limit => 11 },
|
:integer => { :name => "int", :limit => 11 },
|
||||||
|
|
Loading…
Reference in a new issue