Sha256: 3a8486af19dc898eeb2b38d90a60ce3ed0509d8539da190c88316077ddddacc0

Contents?: true

Size: 630 Bytes

Versions: 110

Compression:

Stored size: 630 Bytes

Contents

ActiveRecord::Schema.define do
  # For sqlite 3.1.0+, make a table with a autoincrement column
  if supports_autoincrement?
    create_table :table_with_autoincrement, :force => true do |t|
      t.column :name, :string
    end
  end

  execute "DROP TABLE fk_test_has_fk" rescue nil
  execute "DROP TABLE fk_test_has_pk" rescue nil
  execute <<_SQL
  CREATE TABLE 'fk_test_has_pk' (
    'id' INTEGER NOT NULL PRIMARY KEY
  );
_SQL

  execute <<_SQL
  CREATE TABLE 'fk_test_has_fk' (
    'id'    INTEGER NOT NULL PRIMARY KEY,
    'fk_id' INTEGER NOT NULL,

    FOREIGN KEY ('fk_id') REFERENCES 'fk_test_has_pk'('id')
  );
_SQL
end

Version data entries

110 entries across 107 versions & 22 rubygems

Version Path
activerecord-2.3.10 test/schema/sqlite_specific_schema.rb
activerecord-2.3.9 test/schema/sqlite_specific_schema.rb
activerecord-2.3.9.pre test/schema/sqlite_specific_schema.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
webroar-0.4.0 src/admin_panel/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
nbudin-castronaut-0.7.5 vendor/activerecord/test/schema/sqlite_specific_schema.rb
radiant-0.9.1 vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
activerecord-2.3.8 test/schema/sqlite_specific_schema.rb
activerecord-2.3.8.pre1 test/schema/sqlite_specific_schema.rb
activerecord-2.3.7 test/schema/sqlite_specific_schema.rb
activerecord-2.3.6 test/schema/sqlite_specific_schema.rb
radiant-0.8.2 vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
radiant-0.9.0.rc2 vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
webroar-0.3.1 src/admin_panel/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
webroar-0.3.0 src/admin_panel/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
usher-0.7.0 spec/rails2_3/vendor/rails/vendor/rails/activerecord/pkg/activerecord-2.3.3/test/schema/sqlite_specific_schema.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activerecord/pkg/activerecord-2.2.2/test/schema/sqlite_specific_schema.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
usher-0.7.0 spec/rails2_3/vendor/rails/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb