diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-23 05:30:14 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-23 05:30:14 +0000 |
commit | 32dcfa69131e1a26829e392cc66093624226be83 (patch) | |
tree | 135d5993a9c623a5498fdc379e7459303e3adf67 /activerecord | |
parent | 767eaa9df13549037f053c89a0a0d334b3086873 (diff) | |
download | rails-32dcfa69131e1a26829e392cc66093624226be83.tar.gz rails-32dcfa69131e1a26829e392cc66093624226be83.tar.bz2 rails-32dcfa69131e1a26829e392cc66093624226be83.zip |
MySQL: update test schema for MySQL 5 strict mode. Closes #5861.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/test/fixtures/db_definitions/mysql.sql | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 3d5346d044..8369a10fac 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* MySQL: update test schema for MySQL 5 strict mode. #5861 [Tom Ward] + * to_xml: correct naming of included associations. #5831 [josh.starcher@gmail.com] * Pushing a record onto a has_many :through sets the association's foreign key to the associate's primary key and adds it to the correct association. #5815, #5829 [josh@hasmanythrough.com] diff --git a/activerecord/test/fixtures/db_definitions/mysql.sql b/activerecord/test/fixtures/db_definitions/mysql.sql index 61ba43e954..c6a78962c6 100755 --- a/activerecord/test/fixtures/db_definitions/mysql.sql +++ b/activerecord/test/fixtures/db_definitions/mysql.sql @@ -51,7 +51,7 @@ CREATE TABLE `developers` ( CREATE TABLE `projects` ( `id` int(11) NOT NULL auto_increment, `name` varchar(100) default NULL, - `type` VARCHAR(255) NOT NULL, + `type` VARCHAR(255) default NULL, PRIMARY KEY (`id`) ) TYPE=InnoDB; @@ -106,7 +106,7 @@ CREATE TABLE `auto_id_tests` ( ) TYPE=InnoDB; CREATE TABLE `entrants` ( - `id` INTEGER NOT NULL PRIMARY KEY, + `id` INTEGER NOT NULL auto_increment PRIMARY KEY, `name` VARCHAR(255) NOT NULL, `course_id` INTEGER NOT NULL ); @@ -131,13 +131,13 @@ CREATE TABLE `mixins` ( ) TYPE=InnoDB; CREATE TABLE `people` ( - `id` INTEGER NOT NULL PRIMARY KEY, + `id` INTEGER NOT NULL auto_increment PRIMARY KEY, `first_name` VARCHAR(40) NOT NULL, `lock_version` INTEGER NOT NULL DEFAULT 0 ) TYPE=InnoDB; CREATE TABLE `readers` ( - `id` int(11) NOT NULL PRIMARY KEY, + `id` int(11) NOT NULL auto_increment PRIMARY KEY, `post_id` INTEGER NOT NULL, `person_id` INTEGER NOT NULL ) TYPE=InnoDB; @@ -149,13 +149,13 @@ CREATE TABLE `binaries` ( ) TYPE=InnoDB; CREATE TABLE `computers` ( - `id` INTEGER NOT NULL PRIMARY KEY, + `id` INTEGER NOT NULL auto_increment PRIMARY KEY, `developer` INTEGER NOT NULL, `extendedWarranty` INTEGER NOT NULL ) TYPE=InnoDB; CREATE TABLE `posts` ( - `id` INTEGER NOT NULL PRIMARY KEY, + `id` INTEGER NOT NULL auto_increment PRIMARY KEY, `author_id` INTEGER, `title` VARCHAR(255) NOT NULL, `body` TEXT NOT NULL, @@ -163,14 +163,14 @@ CREATE TABLE `posts` ( ) TYPE=InnoDB; CREATE TABLE `comments` ( - `id` INTEGER NOT NULL PRIMARY KEY, + `id` INTEGER NOT NULL auto_increment PRIMARY KEY, `post_id` INTEGER NOT NULL, `body` TEXT NOT NULL, `type` VARCHAR(255) NOT NULL ) TYPE=InnoDB; CREATE TABLE `authors` ( - `id` INTEGER NOT NULL PRIMARY KEY, + `id` INTEGER NOT NULL auto_increment PRIMARY KEY, `name` VARCHAR(255) NOT NULL ) TYPE=InnoDB; @@ -194,11 +194,11 @@ CREATE TABLE `categories_posts` ( ) TYPE=InnoDB; CREATE TABLE `fk_test_has_pk` ( - `id` INTEGER NOT NULL PRIMARY KEY + `id` INTEGER NOT NULL auto_increment PRIMARY KEY ) TYPE=InnoDB; CREATE TABLE `fk_test_has_fk` ( - `id` INTEGER NOT NULL PRIMARY KEY, + `id` INTEGER NOT NULL auto_increment PRIMARY KEY, `fk_id` INTEGER NOT NULL, FOREIGN KEY (`fk_id`) REFERENCES `fk_test_has_pk`(`id`) @@ -219,7 +219,7 @@ CREATE TABLE `legacy_things` ( ) TYPE=InnoDB; CREATE TABLE `numeric_data` ( - `id` INTEGER NOT NULL PRIMARY KEY, + `id` INTEGER NOT NULL auto_increment PRIMARY KEY, `bank_balance` decimal(10,2), `big_bank_balance` decimal(15,2), `world_population` decimal(10), |