Permalink
Browse files

Added new column to all db definitions. Where, oh where, is our hereo…

… 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...
1 parent 1383d1c commit b56cac56dd0e8c38a5725490a86f05cb77aee6ca @dhh dhh committed Feb 28, 2006
@@ -1,4 +1,5 @@
DROP TABLE accounts;
+DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
@@ -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,
@@ -1,4 +1,5 @@
DROP TABLE accounts;
+DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
@@ -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;
@@ -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),
@@ -1,4 +1,5 @@
DROP TABLE accounts;
+DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
@@ -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,
@@ -1,4 +1,5 @@
drop table accounts;
+drop table funny_jokes;
drop table companies;
drop table topics;
drop synonym subjects;
@@ -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;
@@ -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,
@@ -1,4 +1,5 @@
DROP TABLE accounts;
+DROP TABLE funny_jokes;
DROP TABLE companies;
DROP SEQUENCE companies_nonstd_seq;
DROP TABLE topics;
@@ -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 (
@@ -1,4 +1,5 @@
DROP TABLE accounts;
+DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
@@ -1,4 +1,5 @@
DROP TABLE accounts;
+DROP TABLE funny_jokes;
DROP TABLE companies;
DROP TABLE topics;
DROP TABLE developers;
@@ -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,

0 comments on commit b56cac5

Please sign in to comment.