Sha256: 0ef7f70ee3d12ed1ef6c9a306b2c48ef794d4b82a6bc4602a141c7c0b6a0aa5e

Contents?: true

Size: 520 Bytes

Versions: 10

Compression:

Stored size: 520 Bytes

Contents

# Copyright 2023 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
        t.string :last_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

10 entries across 6 versions & 1 rubygems

Version Path
activerecord-spanner-adapter-1.6.3 examples/snippets/tags/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.3 examples/snippets/query-logs/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.2 examples/snippets/query-logs/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.2 examples/snippets/tags/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.1 examples/snippets/tags/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.1 examples/snippets/query-logs/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.0 examples/snippets/tags/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.0 examples/snippets/query-logs/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.5.1 examples/snippets/tags/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.5.0 examples/snippets/tags/db/migrate/01_create_tables.rb