Sha256: 81a6c69189565680e2745389f696963abe0ad76306d59fe1b251cd7deb4a749a
Contents?: true
Size: 885 Bytes
Versions: 2
Compression:
Stored size: 885 Bytes
Contents
class BasicModels < ActiveRecord::Migration def change create_table :countries do |t| t.string :name t.string :iso2 t.string :iso3 t.string :un t.timestamps end create_table :homes do |t| t.string :address t.references :country t.timestamps end create_table :doors do |t| t.string :sku, index: true t.timestamps end create_table :home_doors do |t| t.references :home t.references :door t.string :location t.timestamps end create_table :handles do |t| t.references :openable, polymorphic: true, index: true t.string :sku, index: true t.timestamps end create_table :items do |t| t.string :sku, index: true, unique: true t.integer :height t.integer :width t.integer :depth t.timestamps end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
model_mirror-0.1.0 | test/dummy/db/migrate/20161218221449_basic_models.rb |
model_mirror-0.0.1 | test/dummy/db/migrate/20161218221449_basic_models.rb |