Permalink
Browse files

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
  • Loading branch information...
1 parent 767eaa9 commit 32dcfa69131e1a26829e392cc66093624226be83 @jeremy jeremy committed Aug 23, 2006
Showing with 13 additions and 11 deletions.
  1. +2 −0 activerecord/CHANGELOG
  2. +11 −11 activerecord/test/fixtures/db_definitions/mysql.sql
@@ -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]
@@ -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,28 +149,28 @@ 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,
`type` VARCHAR(255) NOT NULL
) 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),

0 comments on commit 32dcfa6

Please sign in to comment.