Sha256: e254fbee3a703594ccc78fda6e80a3b8c438dcbdf0cbb2c917b769a3c3c4bcdc
Contents?: true
Size: 945 Bytes
Versions: 5
Compression:
Stored size: 945 Bytes
Contents
module TestDb def self.up ActiveRecord::Base.connection.create_table :documents, force: true do |t| t.string :name t.string :surname t.boolean :keep_alive t.timestamps end ActiveRecord::Base.connection.create_table :sections, force: true do |t| t.string :title t.integer :document_id t.integer :chapter_id t.timestamps end ActiveRecord::Base.connection.create_table :chapters, force: true do |t| t.string :title t.timestamps end ActiveRecord::Base.connection.create_table :users, force: true do |t| t.string :email t.string :firstname t.string :lastname t.timestamps end end def self.down ActiveRecord::Base.connection.drop_table :users ActiveRecord::Base.connection.drop_table :chapters ActiveRecord::Base.connection.drop_table :sections ActiveRecord::Base.connection.drop_table :documents end end
Version data entries
5 entries across 5 versions & 1 rubygems