aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/schema/sqlite_specific_schema.rb
blob: cc7c36fe2b876f4e63c7e57943a46d0d432e5e55 (plain) (tree)
1
2
3
4
5
6
                              



                                                
                                        







                                         
                                                              

    
   
ActiveRecord::Schema.define do
  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' (
    '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'('pk_id')
  );
_SQL
end