diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-23 00:56:13 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-23 00:56:13 +0000 |
commit | f30b7a31bda74715c09759d03064f6f7c7c784b9 (patch) | |
tree | 720af60a1f2ca12c087af1d2d44ec0df98af9ebe /activerecord/test/fixtures/db_definitions | |
parent | 4043b5cdb3152f09727b3fb0a5b43679cdea7406 (diff) | |
download | rails-f30b7a31bda74715c09759d03064f6f7c7c784b9.tar.gz rails-f30b7a31bda74715c09759d03064f6f7c7c784b9.tar.bz2 rails-f30b7a31bda74715c09759d03064f6f7c7c784b9.zip |
Fixed the MS SQL adapter to work with the new limit/offset approach and with binary data (still suffering from 7KB limit, though) #901 [delynnb]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@982 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/db_definitions')
-rw-r--r-- | activerecord/test/fixtures/db_definitions/sqlserver.drop.sql | 3 | ||||
-rw-r--r-- | activerecord/test/fixtures/db_definitions/sqlserver.sql | 83 |
2 files changed, 36 insertions, 50 deletions
diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql b/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql index 1f611c8d5a..19da3f8e61 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.drop.sql @@ -14,5 +14,4 @@ DROP TABLE colnametests; DROP TABLE mixins; DROP TABLE people; DROP TABLE binaries; -DROP TABLE computers; - +DROP TABLE computers;
\ No newline at end of file diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql index 4ed5b8ef79..11d5b30255 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql @@ -1,88 +1,79 @@ CREATE TABLE accounts ( - id int NOT NULL IDENTITY(1, 1), + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, firm_id int default NULL, - credit_limit int default NULL, - PRIMARY KEY (id) + credit_limit int default NULL ) CREATE TABLE companies ( - id int NOT NULL IDENTITY(1, 1), + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, 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, - companies_count int default 0, - rating int default 1, - PRIMARY KEY (id) + rating int default 1 ) CREATE TABLE topics ( - id int NOT NULL IDENTITY(1, 1), + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, title varchar(255) default NULL, author_name varchar(255) default NULL, author_email_address varchar(255) default NULL, written_on datetime default NULL, + bonus_time datetime default NULL, last_read datetime default NULL, content text, approved tinyint default 1, replies_count int default 0, parent_id int default NULL, - type varchar(50) default NULL, - PRIMARY KEY (id) + type varchar(50) default NULL ) CREATE TABLE developers ( - id int NOT NULL IDENTITY(1, 1), + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, name varchar(100) default NULL, - PRIMARY KEY (id) + salary int default 70000 ); CREATE TABLE projects ( - id int NOT NULL IDENTITY(1, 1), - name varchar(100) default NULL, - salary int default 70000, - PRIMARY KEY (id) + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + name varchar(100) default NULL ); CREATE TABLE developers_projects ( developer_id int NOT NULL, - project_id int NOT NULL + project_id int NOT NULL, + joined_on datetime default NULL ); CREATE TABLE customers ( - id int NOT NULL IDENTITY(1, 1), + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, 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, - gps_location varchar(100) default NULL, - PRIMARY KEY (id) + gps_location varchar(100) default NULL ); CREATE TABLE movies ( - movieid int NOT NULL IDENTITY(1, 1), - name varchar(100) default NULL, - PRIMARY KEY (movieid) + movieid int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + name varchar(100) default NULL ); CREATE TABLE subscribers ( - nick varchar(100) NOT NULL, - name varchar(100) default NULL, - PRIMARY KEY (nick) + nick varchar(100) NOT NULL PRIMARY KEY, + name varchar(100) default NULL ); CREATE TABLE booleantests ( - id int NOT NULL IDENTITY(1, 1), - value integer default NULL, - PRIMARY KEY (id) + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + value bit default NULL ); CREATE TABLE auto_id_tests ( - auto_id int NOT NULL IDENTITY(1, 1), - value int default NULL, - PRIMARY KEY (auto_id) + auto_id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + value int default NULL ); CREATE TABLE entrants ( @@ -92,22 +83,20 @@ CREATE TABLE entrants ( ); CREATE TABLE colnametests ( - id int NOT NULL IDENTITY(1, 1), - [references] int NOT NULL, - PRIMARY KEY (id) + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + [references] int NOT NULL ); CREATE TABLE mixins ( - id int NOT NULL IDENTITY(1, 1), - parent_id int default NULL, - type varchar(40) default NULL, + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + parent_id int default NULL, pos int default NULL, - lft int default NULL, - rgt int default NULL, - root_id int default NULL, created_at datetime default NULL, updated_at datetime default NULL, - PRIMARY KEY (id) + lft int default NULL, + rgt int default NULL, + root_id int default NULL, + type varchar(40) default NULL ); CREATE TABLE people ( @@ -118,14 +107,12 @@ CREATE TABLE people ( ); CREATE TABLE binaries ( - id int NOT NULL IDENTITY(1, 1), - data image NULL, - PRIMARY KEY (id) + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + data image NULL ); CREATE TABLE computers ( - id int NOT NULL IDENTITY(1, 1), - developer int NOT NULL, - PRIMARY KEY (id) + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, + developer int NOT NULL ); |