diff options
Diffstat (limited to 'activerecord/test/fixtures/db_definitions')
12 files changed, 42 insertions, 2 deletions
diff --git a/activerecord/test/fixtures/db_definitions/db2.drop.sql b/activerecord/test/fixtures/db_definitions/db2.drop.sql index 1f611c8d5a..88e6516c81 100644 --- a/activerecord/test/fixtures/db_definitions/db2.drop.sql +++ b/activerecord/test/fixtures/db_definitions/db2.drop.sql @@ -15,4 +15,5 @@ DROP TABLE mixins; DROP TABLE people; DROP TABLE binaries; DROP TABLE computers; +DROP TABLE tasks; diff --git a/activerecord/test/fixtures/db_definitions/db2.sql b/activerecord/test/fixtures/db_definitions/db2.sql index 07569c27ed..856847e500 100644 --- a/activerecord/test/fixtures/db_definitions/db2.sql +++ b/activerecord/test/fixtures/db_definitions/db2.sql @@ -129,3 +129,8 @@ CREATE TABLE computers ( developer int NOT NULL ); +CREATE TABLE tasks ( + id int generated by default as identity (start with +10000), + starting timestamp default NULL, + ending timestamp default NULL +); diff --git a/activerecord/test/fixtures/db_definitions/drop_oracle_tables.sql b/activerecord/test/fixtures/db_definitions/drop_oracle_tables.sql index b300d13485..2eb574df75 100644 --- a/activerecord/test/fixtures/db_definitions/drop_oracle_tables.sql +++ b/activerecord/test/fixtures/db_definitions/drop_oracle_tables.sql @@ -32,4 +32,6 @@ DROP TABLE binaries; DROP SEQUENCE binaries_id; DROP TABLE computers; DROP SEQUENCE computers_id; +DROP TABLE tasks; +DROP SEQUENCE tasks_id; EXIT; diff --git a/activerecord/test/fixtures/db_definitions/mysql.drop.sql b/activerecord/test/fixtures/db_definitions/mysql.drop.sql index 99b391ea16..d8eaf9b29c 100644 --- a/activerecord/test/fixtures/db_definitions/mysql.drop.sql +++ b/activerecord/test/fixtures/db_definitions/mysql.drop.sql @@ -15,7 +15,7 @@ DROP TABLE mixins; DROP TABLE people; DROP TABLE binaries; DROP TABLE computers; +DROP TABLE tasks; DROP TABLE posts; DROP TABLE comments; DROP TABLE authors; - diff --git a/activerecord/test/fixtures/db_definitions/mysql.sql b/activerecord/test/fixtures/db_definitions/mysql.sql index 8c919ff4ca..235a1c84d1 100755 --- a/activerecord/test/fixtures/db_definitions/mysql.sql +++ b/activerecord/test/fixtures/db_definitions/mysql.sql @@ -147,3 +147,9 @@ CREATE TABLE `authors` ( `name` VARCHAR(255) NOT NULL ) TYPE=InnoDB; +CREATE TABLE `tasks` ( + `id` int(11) NOT NULL auto_increment, + `starting` datetime NOT NULL default '0000-00-00 00:00:00', + `ending` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +); diff --git a/activerecord/test/fixtures/db_definitions/oci.sql b/activerecord/test/fixtures/db_definitions/oci.sql index 16d6e660a2..b17b1091cb 100644 --- a/activerecord/test/fixtures/db_definitions/oci.sql +++ b/activerecord/test/fixtures/db_definitions/oci.sql @@ -166,3 +166,9 @@ create table computers ( id integer not null primary key, developer integer not null references developers initially deferred disable ); + +create table tasks ( + id integer not null primary key, + starting date default null, + ending date default null +); diff --git a/activerecord/test/fixtures/db_definitions/postgresql.drop.sql b/activerecord/test/fixtures/db_definitions/postgresql.drop.sql index 1f611c8d5a..88e6516c81 100644 --- a/activerecord/test/fixtures/db_definitions/postgresql.drop.sql +++ b/activerecord/test/fixtures/db_definitions/postgresql.drop.sql @@ -15,4 +15,5 @@ DROP TABLE mixins; DROP TABLE people; DROP TABLE binaries; DROP TABLE computers; +DROP TABLE tasks; diff --git a/activerecord/test/fixtures/db_definitions/postgresql.sql b/activerecord/test/fixtures/db_definitions/postgresql.sql index ab392c5688..53618b653d 100644 --- a/activerecord/test/fixtures/db_definitions/postgresql.sql +++ b/activerecord/test/fixtures/db_definitions/postgresql.sql @@ -147,3 +147,9 @@ CREATE TABLE computers ( developer integer NOT NULL ); +CREATE TABLE taske ( + id serial, + starting timestamp, + ending timestamp, + PRIMARY KEY (id) +); diff --git a/activerecord/test/fixtures/db_definitions/sqlite.drop.sql b/activerecord/test/fixtures/db_definitions/sqlite.drop.sql index 3fd60de17b..d8eaf9b29c 100644 --- a/activerecord/test/fixtures/db_definitions/sqlite.drop.sql +++ b/activerecord/test/fixtures/db_definitions/sqlite.drop.sql @@ -15,6 +15,7 @@ DROP TABLE mixins; DROP TABLE people; DROP TABLE binaries; DROP TABLE computers; +DROP TABLE tasks; DROP TABLE posts; DROP TABLE comments; DROP TABLE authors; diff --git a/activerecord/test/fixtures/db_definitions/sqlite.sql b/activerecord/test/fixtures/db_definitions/sqlite.sql index db31835807..8639182266 100644 --- a/activerecord/test/fixtures/db_definitions/sqlite.sql +++ b/activerecord/test/fixtures/db_definitions/sqlite.sql @@ -134,3 +134,9 @@ CREATE TABLE 'authors' ( 'name' VARCHAR(255) NOT NULL ); +CREATE TABLE 'tasks' ( + 'id' INTEGER NOT NULL PRIMARY KEY, + 'starting' DATETIME DEFAULT NULL, + 'ending' DATETIME DEFAULT NULL +); + diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql b/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql index 19da3f8e61..480b2703c4 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql @@ -14,4 +14,5 @@ DROP TABLE colnametests; DROP TABLE mixins; DROP TABLE people; DROP TABLE binaries; -DROP TABLE computers;
\ No newline at end of file +DROP TABLE computers; +DROP TABLE tasks; diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql index 11d5b30255..de746efb57 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql @@ -116,3 +116,8 @@ CREATE TABLE computers ( developer int NOT NULL ); +CREATE TABLE tasks ( + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + starting datetime default NULL, + ending datetime default NULL +); |