diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-18 05:28:59 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-18 05:28:59 +0000 |
commit | a2f26b971bf61263582604ad7e1af14b9566949e (patch) | |
tree | 1ca5aff6b73e2bd334277a53aaaf438ace7cd51f /activerecord/test/fixtures/db_definitions | |
parent | 4f00d181d5a6c01aeb1c19f8ab002153a39c8a17 (diff) | |
download | rails-a2f26b971bf61263582604ad7e1af14b9566949e.tar.gz rails-a2f26b971bf61263582604ad7e1af14b9566949e.tar.bz2 rails-a2f26b971bf61263582604ad7e1af14b9566949e.zip |
Fixed that adding a record to a has_and_belongs_to collection would always save it -- now it only saves if its a new record #1203 [Alisdair McDiarmid]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1453 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/db_definitions')
6 files changed, 14 insertions, 2 deletions
diff --git a/activerecord/test/fixtures/db_definitions/db2.sql b/activerecord/test/fixtures/db_definitions/db2.sql index 6d13c73fbe..bd1696d546 100644 --- a/activerecord/test/fixtures/db_definitions/db2.sql +++ b/activerecord/test/fixtures/db_definitions/db2.sql @@ -36,6 +36,8 @@ CREATE TABLE developers ( id int generated by default as identity (start with +10000), name varchar(100) default NULL, salary int default 70000, + created_at timestamp default NULL, + updated_at timestamp default NULL, PRIMARY KEY (id) ); diff --git a/activerecord/test/fixtures/db_definitions/mysql.sql b/activerecord/test/fixtures/db_definitions/mysql.sql index 5a24ea3768..6fa1a38615 100755 --- a/activerecord/test/fixtures/db_definitions/mysql.sql +++ b/activerecord/test/fixtures/db_definitions/mysql.sql @@ -37,6 +37,8 @@ CREATE TABLE `developers` ( `id` int(11) NOT NULL auto_increment, `name` varchar(100) default NULL, `salary` int(11) default 70000, + `created_at` datetime default NULL, + `updated_at` datetime default NULL, PRIMARY KEY (`id`) ) TYPE=InnoDB; diff --git a/activerecord/test/fixtures/db_definitions/oci.sql b/activerecord/test/fixtures/db_definitions/oci.sql index 5650c93475..be6872a26a 100644 --- a/activerecord/test/fixtures/db_definitions/oci.sql +++ b/activerecord/test/fixtures/db_definitions/oci.sql @@ -55,6 +55,8 @@ create table developers ( id integer not null, name varchar(100) default null, salary integer default 70000, + created_at timestamp default null, + updated_at timestamp default null, primary key (id) ); diff --git a/activerecord/test/fixtures/db_definitions/postgresql.sql b/activerecord/test/fixtures/db_definitions/postgresql.sql index 134f030f13..60623e5a48 100644 --- a/activerecord/test/fixtures/db_definitions/postgresql.sql +++ b/activerecord/test/fixtures/db_definitions/postgresql.sql @@ -28,6 +28,8 @@ CREATE TABLE developers ( id serial, name character varying(100), salary integer DEFAULT 70000, + created_at timestamp, + updated_at timestamp, PRIMARY KEY (id) ); SELECT setval('developers_id_seq', 100); diff --git a/activerecord/test/fixtures/db_definitions/sqlite.sql b/activerecord/test/fixtures/db_definitions/sqlite.sql index 07d2ea33fd..08a515e67b 100644 --- a/activerecord/test/fixtures/db_definitions/sqlite.sql +++ b/activerecord/test/fixtures/db_definitions/sqlite.sql @@ -33,7 +33,9 @@ CREATE TABLE 'topics' ( CREATE TABLE 'developers' ( 'id' INTEGER PRIMARY KEY NOT NULL, 'name' TEXT DEFAULT NULL, - 'salary' INTEGER DEFAULT 70000 + 'salary' INTEGER DEFAULT 70000, + 'created_at' DATETIME DEFAULT NULL, + 'updated_at' DATETIME DEFAULT NULL ); CREATE TABLE 'projects' ( diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql index c96114de89..9c5658e387 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql @@ -32,7 +32,9 @@ CREATE TABLE topics ( CREATE TABLE developers ( id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, name varchar(100) default NULL, - salary int default 70000 + salary int default 70000, + created_at datetime default NULL, + updated_at datetime default NULL ); CREATE TABLE projects ( |