Sha256: c0224d3043f99442e5509e3f24716c450c1386e94295f2f7f2f5dd2e7895624f
Contents?: true
Size: 741 Bytes
Versions: 19
Compression:
Stored size: 741 Bytes
Contents
# Copyright 2021 Google LLC # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. class CreateTables < ActiveRecord::Migration[6.0] def change connection.ddl_batch do create_table :singers do |t| t.string :first_name, limit: 100 t.string :last_name, limit: 200, null: false t.string :full_name, limit: 300, null: false, as: "COALESCE(first_name || ' ', '') || last_name", stored: true t.index [:full_name], name: "index_singers_on_full_name" end create_table :albums do |t| t.string :title t.references :singer, index: false, foreign_key: true end end end end
Version data entries
19 entries across 19 versions & 1 rubygems