Froze rails gems
[depot.git] / vendor / rails / activerecord / test / schema / sqlite_specific_schema.rb
1 ActiveRecord::Schema.define do
2 # For sqlite 3.1.0+, make a table with a autoincrement column
3 if supports_autoincrement?
4 create_table :table_with_autoincrement, :force => true do |t|
5 t.column :name, :string
6 end
7 end
8
9 execute "DROP TABLE fk_test_has_fk" rescue nil
10 execute "DROP TABLE fk_test_has_pk" rescue nil
11 execute <<_SQL
12 CREATE TABLE 'fk_test_has_pk' (
13 'id' INTEGER NOT NULL PRIMARY KEY
14 );
15 _SQL
16
17 execute <<_SQL
18 CREATE TABLE 'fk_test_has_fk' (
19 'id' INTEGER NOT NULL PRIMARY KEY,
20 'fk_id' INTEGER NOT NULL,
21
22 FOREIGN KEY ('fk_id') REFERENCES 'fk_test_has_pk'('id')
23 );
24 _SQL
25 end