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