diff options
author | Michael Koziarski <michael@koziarski.com> | 2006-02-10 05:19:41 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2006-02-10 05:19:41 +0000 |
commit | 5f4b66201eb9bd01be96a212adfea8fb95334380 (patch) | |
tree | 619c8ce24e8f143828d5aca229f151c55f459f99 /activerecord/test/fixtures/db_definitions | |
parent | 7e6d5b51093c6fae345f6460130bbe2c495b95f4 (diff) | |
download | rails-5f4b66201eb9bd01be96a212adfea8fb95334380.tar.gz rails-5f4b66201eb9bd01be96a212adfea8fb95334380.tar.bz2 rails-5f4b66201eb9bd01be96a212adfea8fb95334380.zip |
Allow has_many :through to work with :include [Michael Schoen]. Closes #3611
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/db_definitions')
7 files changed, 50 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/db_definitions/db2.sql b/activerecord/test/fixtures/db_definitions/db2.sql index 9bb2ad991a..d570f925e9 100644 --- a/activerecord/test/fixtures/db_definitions/db2.sql +++ b/activerecord/test/fixtures/db_definitions/db2.sql @@ -130,6 +130,13 @@ CREATE TABLE people ( PRIMARY KEY (id) ); +CREATE TABLE readers ( + id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 10000), + post_id INT NOT NULL, + person_id INT NOT NULL, + PRIMARY KEY (id) +); + CREATE TABLE binaries ( id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 10000), data BLOB(50000), diff --git a/activerecord/test/fixtures/db_definitions/firebird.sql b/activerecord/test/fixtures/db_definitions/firebird.sql index 28e4c71b71..87eb00c53f 100644 --- a/activerecord/test/fixtures/db_definitions/firebird.sql +++ b/activerecord/test/fixtures/db_definitions/firebird.sql @@ -161,6 +161,15 @@ CREATE TABLE people ( CREATE GENERATOR people_seq; SET GENERATOR people_seq TO 10000; +CREATE TABLE readers ( + id BIGINT NOT NULL, + post_id BIGINT NOT NULL, + person_id BIGINT NOT NULL, + PRIMARY KEY (id) +); +CREATE GENERATOR readers_seq; +SET GENERATOR readers_seq TO 10000; + CREATE TABLE binaries ( id BIGINT NOT NULL, data BLOB, diff --git a/activerecord/test/fixtures/db_definitions/mysql.sql b/activerecord/test/fixtures/db_definitions/mysql.sql index 83479393f4..21c3b0176e 100755 --- a/activerecord/test/fixtures/db_definitions/mysql.sql +++ b/activerecord/test/fixtures/db_definitions/mysql.sql @@ -130,6 +130,12 @@ CREATE TABLE `people` ( `lock_version` INTEGER NOT NULL DEFAULT 0 ) TYPE=InnoDB; +CREATE TABLE `readers` ( + `id` int(11) NOT NULL PRIMARY KEY, + `post_id` INTEGER NOT NULL, + `person_id` INTEGER NOT NULL +) TYPE=InnoDB; + CREATE TABLE `binaries` ( `id` int(11) NOT NULL auto_increment, `data` mediumblob, diff --git a/activerecord/test/fixtures/db_definitions/oci.sql b/activerecord/test/fixtures/db_definitions/oci.sql index 9995f4c85e..760659d1c4 100644 --- a/activerecord/test/fixtures/db_definitions/oci.sql +++ b/activerecord/test/fixtures/db_definitions/oci.sql @@ -187,6 +187,14 @@ create table people ( ); create sequence people_seq minvalue 10000; +create table readers ( + id integer not null, + post_id integer not null, + person_id integer not null, + primary key (id) +); +create sequence readers_seq minvalue 10000; + create table binaries ( id integer not null, data blob null, diff --git a/activerecord/test/fixtures/db_definitions/postgresql.sql b/activerecord/test/fixtures/db_definitions/postgresql.sql index c01afc206d..490f915791 100644 --- a/activerecord/test/fixtures/db_definitions/postgresql.sql +++ b/activerecord/test/fixtures/db_definitions/postgresql.sql @@ -153,6 +153,13 @@ CREATE TABLE people ( PRIMARY KEY (id) ); +CREATE TABLE readers ( + id serial, + post_id integer NOT NULL, + person_id integer NOT NULL, + primary key (id) +); + CREATE TABLE binaries ( id serial , data bytea, diff --git a/activerecord/test/fixtures/db_definitions/sqlite.sql b/activerecord/test/fixtures/db_definitions/sqlite.sql index b66969a40b..685c2abc8b 100644 --- a/activerecord/test/fixtures/db_definitions/sqlite.sql +++ b/activerecord/test/fixtures/db_definitions/sqlite.sql @@ -118,6 +118,12 @@ CREATE TABLE 'people' ( 'lock_version' INTEGER NOT NULL DEFAULT 0 ); +CREATE TABLE 'readers' ( + 'id' INTEGER NOT NULL PRIMARY KEY, + 'post_id' INTEGER NOT NULL, + 'person_id' INTEGER NOT NULL +); + CREATE TABLE 'binaries' ( 'id' INTEGER NOT NULL PRIMARY KEY, 'data' BLOB DEFAULT NULL diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql index 81399b7d26..5999bdd1b4 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql @@ -118,6 +118,13 @@ CREATE TABLE people ( PRIMARY KEY (id) ); +CREATE TABLE readers ( + id int NOT NULL IDENTITY(1, 1), + post_id int NOT NULL, + person_id int NOT NULL, + primary key (id) +); + CREATE TABLE binaries ( id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, data image NULL |