Sha256: ca32419740f610d65959136d76ea4dbf1b367f0e93f8e871a27e38b317cfe3c3
Contents?: true
Size: 1.01 KB
Versions: 16
Compression:
Stored size: 1.01 KB
Contents
create_table :affiliates, id: :bigint, options: "CHARACTER SET utf8mb4 COLLATE utf8mb4_bin" do |t| t.string :name, limit: 250, null: true, charset: "utf8mb4", collation: "utf8mb4_bin" t.integer :category_id, limit: 8, null: false end create_table :advertisers, id: :bigint, options: "CHARACTER SET utf8mb4 COLLATE utf8mb4_bin" do |t| t.string :name, limit: 250, null: true, charset: "utf8mb4", collation: "utf8mb4_bin" t.integer :category_id, limit: 8, null: false end create_table :categories, id: :bigint, options: "CHARACTER SET utf8mb4 COLLATE utf8mb4_bin" do |t| t.string :name, limit: 250, null: true, charset: "utf8mb4", collation: "utf8mb4_bin" 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
16 entries across 8 versions & 1 rubygems