Sha256: 33dc963fc80e77643132701d5190915da1464e799e47939193f7398529e461dd
Contents?: true
Size: 744 Bytes
Versions: 9
Compression:
Stored size: 744 Bytes
Contents
create_table :categories, id: :bigserial do |t| t.string :name, limit: 250, null: true end create_table :advertisers, id: :bigserial do |t| t.string :name, limit: 250, null: true t.integer :category_id, limit: 8, null: false end create_table :affiliates, id: :bigserial do |t| t.string :name, limit: 250, null: true t.integer :category_id, limit: 8, null: false end add_index :advertisers, [:category_id], name: :index_advertisers_on_category_id add_index :affiliates, [:category_id], name: :index_affiliates_on_category_id add_foreign_key :advertisers, :categories, column: :category_id, name: :index_advertisers_on_category_id add_foreign_key :affiliates, :categories, column: :category_id, name: :index_affiliates_on_category_id
Version data entries
9 entries across 9 versions & 1 rubygems