diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-20 21:21:41 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-20 21:21:41 +0000 |
commit | 101968f3674dfedb0549a54bf6407c287d357f0a (patch) | |
tree | f619811941d11d5b59db39f4d4152759eeacb4a7 /activerecord/test/fixtures | |
parent | 8322ea45c1087325fd428a201749791550bc7859 (diff) | |
download | rails-101968f3674dfedb0549a54bf6407c287d357f0a.tar.gz rails-101968f3674dfedb0549a54bf6407c287d357f0a.tar.bz2 rails-101968f3674dfedb0549a54bf6407c287d357f0a.zip |
Added automatic dropping/creating of test tables for running the unit tests on all databases #587 [adelle@bullet.net.au]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures')
20 files changed, 114 insertions, 4 deletions
diff --git a/activerecord/test/fixtures/db_definitions/db2.drop.sql b/activerecord/test/fixtures/db_definitions/db2.drop.sql new file mode 100644 index 0000000000..1f611c8d5a --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/db2.drop.sql @@ -0,0 +1,18 @@ +DROP TABLE accounts; +DROP TABLE companies; +DROP TABLE topics; +DROP TABLE developers; +DROP TABLE projects; +DROP TABLE developers_projects; +DROP TABLE customers; +DROP TABLE movies; +DROP TABLE subscribers; +DROP TABLE booleantests; +DROP TABLE auto_id_tests; +DROP TABLE entrants; +DROP TABLE colnametests; +DROP TABLE mixins; +DROP TABLE people; +DROP TABLE binaries; +DROP TABLE computers; + diff --git a/activerecord/test/fixtures/db_definitions/db2.sql b/activerecord/test/fixtures/db_definitions/db2.sql index 033efcb088..46e326d504 100644 --- a/activerecord/test/fixtures/db_definitions/db2.sql +++ b/activerecord/test/fixtures/db_definitions/db2.sql @@ -127,3 +127,4 @@ CREATE TABLE computers ( id int generated by default as identity (start with +10000), developer int NOT NULL ); + diff --git a/activerecord/test/fixtures/db_definitions/db22.drop.sql b/activerecord/test/fixtures/db_definitions/db22.drop.sql new file mode 100644 index 0000000000..df00ffd7c9 --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/db22.drop.sql @@ -0,0 +1,2 @@ +DROP TABLE courses; + diff --git a/activerecord/test/fixtures/db_definitions/db22.sql b/activerecord/test/fixtures/db_definitions/db22.sql index dc4f9ed364..9198cf5f6e 100644 --- a/activerecord/test/fixtures/db_definitions/db22.sql +++ b/activerecord/test/fixtures/db_definitions/db22.sql @@ -2,3 +2,4 @@ CREATE TABLE courses ( id int NOT NULL PRIMARY KEY, name varchar(255) NOT NULL ); + diff --git a/activerecord/test/fixtures/db_definitions/mysql.drop.sql b/activerecord/test/fixtures/db_definitions/mysql.drop.sql new file mode 100644 index 0000000000..1f611c8d5a --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/mysql.drop.sql @@ -0,0 +1,18 @@ +DROP TABLE accounts; +DROP TABLE companies; +DROP TABLE topics; +DROP TABLE developers; +DROP TABLE projects; +DROP TABLE developers_projects; +DROP TABLE customers; +DROP TABLE movies; +DROP TABLE subscribers; +DROP TABLE booleantests; +DROP TABLE auto_id_tests; +DROP TABLE entrants; +DROP TABLE colnametests; +DROP TABLE mixins; +DROP TABLE people; +DROP TABLE binaries; +DROP TABLE computers; + diff --git a/activerecord/test/fixtures/db_definitions/mysql.sql b/activerecord/test/fixtures/db_definitions/mysql.sql index 0137cd91d5..1064373f7f 100755 --- a/activerecord/test/fixtures/db_definitions/mysql.sql +++ b/activerecord/test/fixtures/db_definitions/mysql.sql @@ -126,4 +126,5 @@ CREATE TABLE `binaries` ( CREATE TABLE `computers` ( `id` INTEGER NOT NULL PRIMARY KEY, `developer` INTEGER NOT NULL -);
\ No newline at end of file +); + diff --git a/activerecord/test/fixtures/db_definitions/mysql2.drop.sql b/activerecord/test/fixtures/db_definitions/mysql2.drop.sql new file mode 100644 index 0000000000..df00ffd7c9 --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/mysql2.drop.sql @@ -0,0 +1,2 @@ +DROP TABLE courses; + diff --git a/activerecord/test/fixtures/db_definitions/mysql2.sql b/activerecord/test/fixtures/db_definitions/mysql2.sql index 0a16a0a2f9..551e0ecc7d 100644 --- a/activerecord/test/fixtures/db_definitions/mysql2.sql +++ b/activerecord/test/fixtures/db_definitions/mysql2.sql @@ -2,3 +2,4 @@ CREATE TABLE `courses` ( `id` INTEGER NOT NULL PRIMARY KEY, `name` VARCHAR(255) NOT NULL ); + diff --git a/activerecord/test/fixtures/db_definitions/postgresql.drop.sql b/activerecord/test/fixtures/db_definitions/postgresql.drop.sql new file mode 100644 index 0000000000..1f611c8d5a --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/postgresql.drop.sql @@ -0,0 +1,18 @@ +DROP TABLE accounts; +DROP TABLE companies; +DROP TABLE topics; +DROP TABLE developers; +DROP TABLE projects; +DROP TABLE developers_projects; +DROP TABLE customers; +DROP TABLE movies; +DROP TABLE subscribers; +DROP TABLE booleantests; +DROP TABLE auto_id_tests; +DROP TABLE entrants; +DROP TABLE colnametests; +DROP TABLE mixins; +DROP TABLE people; +DROP TABLE binaries; +DROP TABLE computers; + diff --git a/activerecord/test/fixtures/db_definitions/postgresql.sql b/activerecord/test/fixtures/db_definitions/postgresql.sql index 7664c5e6e0..f779027286 100644 --- a/activerecord/test/fixtures/db_definitions/postgresql.sql +++ b/activerecord/test/fixtures/db_definitions/postgresql.sql @@ -144,4 +144,5 @@ CREATE TABLE binaries ( CREATE TABLE computers ( id serial, developer integer NOT NULL -);
\ No newline at end of file +); + diff --git a/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql b/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql new file mode 100644 index 0000000000..df00ffd7c9 --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql @@ -0,0 +1,2 @@ +DROP TABLE courses; + diff --git a/activerecord/test/fixtures/db_definitions/postgresql2.sql b/activerecord/test/fixtures/db_definitions/postgresql2.sql index b58a45eff7..c0d7f79b04 100644 --- a/activerecord/test/fixtures/db_definitions/postgresql2.sql +++ b/activerecord/test/fixtures/db_definitions/postgresql2.sql @@ -1,4 +1,5 @@ CREATE TABLE courses ( id serial, name text -);
\ No newline at end of file +); + diff --git a/activerecord/test/fixtures/db_definitions/sqlite.drop.sql b/activerecord/test/fixtures/db_definitions/sqlite.drop.sql new file mode 100644 index 0000000000..1f611c8d5a --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/sqlite.drop.sql @@ -0,0 +1,18 @@ +DROP TABLE accounts; +DROP TABLE companies; +DROP TABLE topics; +DROP TABLE developers; +DROP TABLE projects; +DROP TABLE developers_projects; +DROP TABLE customers; +DROP TABLE movies; +DROP TABLE subscribers; +DROP TABLE booleantests; +DROP TABLE auto_id_tests; +DROP TABLE entrants; +DROP TABLE colnametests; +DROP TABLE mixins; +DROP TABLE people; +DROP TABLE binaries; +DROP TABLE computers; + diff --git a/activerecord/test/fixtures/db_definitions/sqlite.sql b/activerecord/test/fixtures/db_definitions/sqlite.sql index 1b9a5ea932..988973b0ff 100644 --- a/activerecord/test/fixtures/db_definitions/sqlite.sql +++ b/activerecord/test/fixtures/db_definitions/sqlite.sql @@ -113,4 +113,5 @@ CREATE TABLE 'binaries' ( CREATE TABLE 'computers' ( 'id' INTEGER NOT NULL PRIMARY KEY, 'developer' INTEGER NOT NULL -);
\ No newline at end of file +); + diff --git a/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql b/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql new file mode 100644 index 0000000000..df00ffd7c9 --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql @@ -0,0 +1,2 @@ +DROP TABLE courses; + diff --git a/activerecord/test/fixtures/db_definitions/sqlite2.sql b/activerecord/test/fixtures/db_definitions/sqlite2.sql index 19b123968a..5c0d231bbc 100644 --- a/activerecord/test/fixtures/db_definitions/sqlite2.sql +++ b/activerecord/test/fixtures/db_definitions/sqlite2.sql @@ -2,3 +2,4 @@ CREATE TABLE 'courses' ( 'id' INTEGER NOT NULL PRIMARY KEY, 'name' VARCHAR(255) NOT NULL ); + diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql b/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql new file mode 100644 index 0000000000..1f611c8d5a --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql @@ -0,0 +1,18 @@ +DROP TABLE accounts; +DROP TABLE companies; +DROP TABLE topics; +DROP TABLE developers; +DROP TABLE projects; +DROP TABLE developers_projects; +DROP TABLE customers; +DROP TABLE movies; +DROP TABLE subscribers; +DROP TABLE booleantests; +DROP TABLE auto_id_tests; +DROP TABLE entrants; +DROP TABLE colnametests; +DROP TABLE mixins; +DROP TABLE people; +DROP TABLE binaries; +DROP TABLE computers; + diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql index 95106a7b18..743a5383fe 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql @@ -127,3 +127,4 @@ CREATE TABLE computers ( developer int NOT NULL, PRIMARY KEY (id) ); + diff --git a/activerecord/test/fixtures/db_definitions/sqlserver2.drop.sql b/activerecord/test/fixtures/db_definitions/sqlserver2.drop.sql new file mode 100644 index 0000000000..df00ffd7c9 --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/sqlserver2.drop.sql @@ -0,0 +1,2 @@ +DROP TABLE courses; + diff --git a/activerecord/test/fixtures/db_definitions/sqlserver2.sql b/activerecord/test/fixtures/db_definitions/sqlserver2.sql index dc4f9ed364..9198cf5f6e 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver2.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver2.sql @@ -2,3 +2,4 @@ CREATE TABLE courses ( id int NOT NULL PRIMARY KEY, name varchar(255) NOT NULL ); + |