Skip to content

Commit

Permalink
Added new column to all db definitions. Where, oh where, is our hereo…
Browse files Browse the repository at this point in the history
… that will convert all the legacy fixture schemas to schema.rb? (closes #3993) [Bob Silva]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3695 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Feb 28, 2006
1 parent 1383d1c commit b56cac5
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions activerecord/test/fixtures/db_definitions/db2.drop.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DROP TABLE accounts;
DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
Expand Down
6 changes: 6 additions & 0 deletions activerecord/test/fixtures/db_definitions/db2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ CREATE TABLE accounts (
PRIMARY KEY (id)
);

CREATE TABLE funny_jokes (
id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 10000),
name VARCHAR(50) DEFAULT NULL,
PRIMARY KEY (id)
);

CREATE TABLE companies (
id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 10000),
type VARCHAR(50) DEFAULT NULL,
Expand Down
2 changes: 2 additions & 0 deletions activerecord/test/fixtures/db_definitions/firebird.drop.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DROP TABLE accounts;
DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
Expand Down Expand Up @@ -32,6 +33,7 @@ DROP TABLE legacy_things;
DROP DOMAIN D_BOOLEAN;

DROP GENERATOR accounts_seq;
DROP GENERATOR funny_jokes_seq;
DROP GENERATOR companies_nonstd_seq;
DROP GENERATOR topics_seq;
DROP GENERATOR developers_seq;
Expand Down
8 changes: 8 additions & 0 deletions activerecord/test/fixtures/db_definitions/firebird.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ CREATE TABLE accounts (
CREATE GENERATOR accounts_seq;
SET GENERATOR accounts_seq TO 10000;

CREATE TABLE funny_jokes (
id BIGINT NOT NULL,
name VARCHAR(50),
PRIMARY KEY (id)
);
CREATE GENERATOR funny_jokes_seq;
SET GENERATOR funny_jokes_seq TO 10000;

CREATE TABLE companies (
id BIGINT NOT NULL,
"TYPE" VARCHAR(50),
Expand Down
1 change: 1 addition & 0 deletions activerecord/test/fixtures/db_definitions/mysql.drop.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DROP TABLE accounts;
DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
Expand Down
6 changes: 6 additions & 0 deletions activerecord/test/fixtures/db_definitions/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ CREATE TABLE `accounts` (
PRIMARY KEY (`id`)
) TYPE=InnoDB;

CREATE TABLE `funny_jokes` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(50) default NULL,
PRIMARY KEY (`id`)
) TYPE=InnoDB;

CREATE TABLE `companies` (
`id` int(11) NOT NULL auto_increment,
`type` varchar(50) default NULL,
Expand Down
2 changes: 2 additions & 0 deletions activerecord/test/fixtures/db_definitions/oci.drop.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
drop table accounts;
drop table funny_jokes;
drop table companies;
drop table topics;
drop synonym subjects;
Expand Down Expand Up @@ -30,6 +31,7 @@ drop table keyboards;
drop table legacy_things;

drop sequence accounts_seq;
drop sequence funny_jokes_seq;
drop sequence companies_nonstd_seq;
drop sequence topics_seq;
drop sequence developers_seq;
Expand Down
7 changes: 7 additions & 0 deletions activerecord/test/fixtures/db_definitions/oci.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ create table companies (
--
create sequence companies_nonstd_seq minvalue 10000;

create table funny_jokes (
id integer not null,
name varchar(50) default null,
primary key (id)
);
create sequence funny_jokes_seq minvalue 10000;

create table accounts (
id integer not null,
firm_id integer default null references companies initially deferred disable,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DROP TABLE accounts;
DROP TABLE funny_jokes;
DROP TABLE companies;
DROP SEQUENCE companies_nonstd_seq;
DROP TABLE topics;
Expand Down
5 changes: 5 additions & 0 deletions activerecord/test/fixtures/db_definitions/postgresql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ CREATE TABLE accounts (
PRIMARY KEY (id)
);

CREATE TABLE funny_jokes (
id serial
name character varying(50)
);

CREATE SEQUENCE companies_nonstd_seq START 101;

CREATE TABLE companies (
Expand Down
1 change: 1 addition & 0 deletions activerecord/test/fixtures/db_definitions/sqlite.drop.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DROP TABLE accounts;
DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DROP TABLE accounts;
DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
Expand Down
5 changes: 5 additions & 0 deletions activerecord/test/fixtures/db_definitions/sqlserver.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ CREATE TABLE accounts (
credit_limit int default NULL
);

CREATE TABLE funny_jokes (
id int NOT NULL IDENTITY(1, 1) PRIMARY KEY,
name varchar(50) default NULL
);

CREATE TABLE companies (
id int NOT NULL IDENTITY(1, 1) PRIMARY KEY,
type varchar(50) default NULL,
Expand Down

0 comments on commit b56cac5

Please sign in to comment.