Sha256: c6cdba639bfa384d60505c70d888dcf18b8f249c63505a1fc0bf5a00d1aa054d

Contents?: true

Size: 1.26 KB

Versions: 8

Compression:

Stored size: 1.26 KB

Contents

ActiveRecord::Schema.define do

  execute "drop table test_oracle_defaults" rescue nil
  execute "drop sequence test_oracle_defaults_seq" rescue nil
  execute "drop sequence companies_nonstd_seq" rescue nil
  execute "drop table defaults" rescue nil
  execute "drop sequence defaults_seq" rescue nil

  execute <<-SQL
create table test_oracle_defaults (
  id integer not null primary key,
  test_char char(1) default 'X' not null,
  test_string varchar2(20) default 'hello' not null,
  test_int integer default 3 not null
)
  SQL

  execute <<-SQL
create sequence test_oracle_defaults_seq minvalue 10000
  SQL

  execute "create sequence companies_nonstd_seq minvalue 10000"

  execute <<-SQL
  CREATE TABLE defaults (
      id integer not null,
      modified_date date default sysdate,
      modified_date_function date default sysdate,
      fixed_date date default to_date('2004-01-01', 'YYYY-MM-DD'),
      modified_time date default sysdate,
      modified_time_function date default sysdate,
      fixed_time date default TO_DATE('2004-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS'),
      char1 varchar2(1) default 'Y',
      char2 varchar2(50) default 'a varchar field',
      char3 clob default 'a text field'
  )
  SQL
  execute "create sequence defaults_seq minvalue 10000"

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ibm_db-5.2.0 test/schema/oracle_specific_schema.rb
ibm_db-5.1.0 test/schema/oracle_specific_schema.rb
ibm_db-5.0.5 test/schema/oracle_specific_schema.rb
ibm_db-5.0.4 test/schema/oracle_specific_schema.rb
ibm_db-5.0.3 test/schema/oracle_specific_schema.rb
ibm_db-5.0.2 test/schema/oracle_specific_schema.rb
ibm_db-4.0.0-x86-mingw32 test/schema/oracle_specific_schema.rb
ibm_db-4.0.0 test/schema/oracle_specific_schema.rb