Sha256: a6dcee37fd2c4bb7cc31a388a43a85820716f98a6c52b7736515d35cb354e33f
Contents?: true
Size: 877 Bytes
Versions: 6
Compression:
Stored size: 877 Bytes
Contents
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 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 :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 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
6 entries across 6 versions & 1 rubygems