diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-01 19:22:16 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-01 19:22:16 +0000 |
commit | daf3e92a316c041b6b2bf331c8d2a51e710fe7bf (patch) | |
tree | ca492afaf76db59ec1ab99105c07b54ffb28cc6a /activerecord/test/fixtures/db_definitions | |
parent | a6fefad354d36f3e9a91f8582659ffcda1a35855 (diff) | |
download | rails-daf3e92a316c041b6b2bf331c8d2a51e710fe7bf.tar.gz rails-daf3e92a316c041b6b2bf331c8d2a51e710fe7bf.tar.bz2 rails-daf3e92a316c041b6b2bf331c8d2a51e710fe7bf.zip |
Added a db2 adapter that only depends on the Ruby/DB2 bindings (http://raa.ruby-lang.org/project/ruby-db2/) #386 [Maik Schmidt]. Converted all the fixtures to YAML style ones.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@303 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/db_definitions')
-rw-r--r-- | activerecord/test/fixtures/db_definitions/db2.sql | 112 | ||||
-rw-r--r-- | activerecord/test/fixtures/db_definitions/db22.sql | 4 |
2 files changed, 116 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/db_definitions/db2.sql b/activerecord/test/fixtures/db_definitions/db2.sql new file mode 100644 index 0000000000..7171bd3e16 --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/db2.sql @@ -0,0 +1,112 @@ +CREATE TABLE accounts ( + id int generated by default as identity (start with +10000), + firm_id int default NULL, + credit_limit int default NULL, + PRIMARY KEY (id) +); + +CREATE TABLE companies ( + id int generated by default as identity (start with +10000), + type varchar(50) default NULL, + ruby_type varchar(50) default NULL, + firm_id int default NULL, + name varchar(50) default NULL, + client_of int default NULL, + rating int default 1, + PRIMARY KEY (id) +); + +CREATE TABLE topics ( + id int generated by default as identity (start with +10000), + title varchar(255) default NULL, + author_name varchar(255) default NULL, + author_email_address varchar(255) default NULL, + written_on timestamp default NULL, + bonus_time time default NULL, + last_read date default NULL, + content varchar(3000), + approved smallint default 1, + replies_count int default 0, + parent_id int default NULL, + type varchar(50) default NULL, + PRIMARY KEY (id) +); + +CREATE TABLE developers ( + id int generated by default as identity (start with +10000), + name varchar(100) default NULL, + salary int default 70000, + PRIMARY KEY (id) +); + +CREATE TABLE projects ( + id int generated by default as identity (start with +10000), + name varchar(100) default NULL, + PRIMARY KEY (id) +); + +CREATE TABLE developers_projects ( + developer_id int NOT NULL, + project_id int NOT NULL, + joined_on date default NULL +); + +CREATE TABLE customers ( + id int generated by default as identity (start with +10000), + name varchar(100) default NULL, + balance int default 0, + address_street varchar(100) default NULL, + address_city varchar(100) default NULL, + address_country varchar(100) default NULL, + PRIMARY KEY (id) +); + +CREATE TABLE movies ( + movieid int generated by default as identity (start with +10000), + name varchar(100) default NULL, + PRIMARY KEY (movieid) +); + +CREATE TABLE subscribers ( + nick varchar(100) NOT NULL, + name varchar(100) default NULL, + PRIMARY KEY (nick) +); + +CREATE TABLE booleantests ( + id int generated by default as identity (start with +10000), + value int default NULL, + PRIMARY KEY (id) +); + +CREATE TABLE auto_id_tests ( + auto_id int generated by default as identity (start with +10000), + value int default NULL, + PRIMARY KEY (auto_id) +); + +CREATE TABLE entrants ( + id int NOT NULL PRIMARY KEY, + name varchar(255) NOT NULL, + course_id int NOT NULL +); + +CREATE TABLE colnametests ( + id int generated by default as identity (start with +10000), + references int NOT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE mixins ( + id int generated by default as identity (start with +10000), + parent_id int default NULL, + pos int default NULL, + created_at timestamp default NULL, + updated_at timestamp default NULL, + lft int default NULL, + rgt int default NULL, + root_id int default NULL, + type varchar(40) default NULL, + PRIMARY KEY (id) +); + diff --git a/activerecord/test/fixtures/db_definitions/db22.sql b/activerecord/test/fixtures/db_definitions/db22.sql new file mode 100644 index 0000000000..dc4f9ed364 --- /dev/null +++ b/activerecord/test/fixtures/db_definitions/db22.sql @@ -0,0 +1,4 @@ +CREATE TABLE courses ( + id int NOT NULL PRIMARY KEY, + name varchar(255) NOT NULL +); |