diff options
Diffstat (limited to 'activerecord/test/fixtures/db_definitions/sqlserver.sql')
-rw-r--r-- | activerecord/test/fixtures/db_definitions/sqlserver.sql | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql index acbcaa1384..7b6f1d7afd 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql @@ -88,6 +88,24 @@ CREATE TABLE booleantests ( value bit default NULL ); +CREATE TABLE defaults ( + id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, +-- these brought from the PostgreSQL defaults_test.rb but +-- tests only exist for integers and decimals, currently +-- modified_date date default CURRENT_DATE, +-- modified_date_function date default now(), +-- fixed_date date default '2004-01-01', +-- modified_time timestamp default CURRENT_TIMESTAMP, +-- modified_time_function timestamp default now(), +-- fixed_time timestamp default '2004-01-01 00:00:00.000000-00', +-- char1 char(1) default 'Y', +-- char2 character varying(50) default 'a varchar field', +-- char3 text default 'a text field', + positive_integer integer default 1, + negative_integer integer default -1, + decimal_number decimal(3,2) default 2.78 +); + CREATE TABLE auto_id_tests ( auto_id int NOT NULL IDENTITY(1, 1) PRIMARY KEY, value int default NULL @@ -201,3 +219,12 @@ CREATE TABLE legacy_things ( version int default 0, PRIMARY KEY (id) ); + +CREATE TABLE numeric_data ( + id int NOT NULL IDENTITY(1, 1), + bank_balance decimal(10,2), + big_bank_balance decimal(15,2), + world_population decimal(10), + my_house_population decimal(2), + decimal_number_with_default decimal(3,2) DEFAULT 2.78 +); |