Sha256: b5342bd7323ba2623465cfaf9cda9718ae73f75f3b59b7d03093f1b62d4336a5

Contents?: true

Size: 520 Bytes

Versions: 109

Compression:

Stored size: 520 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
        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

109 entries across 22 versions & 1 rubygems

Version Path
activerecord-spanner-adapter-1.8.0 examples/snippets/bulk-insert/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.8.0 examples/snippets/create-records/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.8.0 examples/snippets/read-only-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.8.0 examples/snippets/quickstart/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.8.0 examples/snippets/stale-reads/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.3 examples/snippets/quickstart/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.3 examples/snippets/read-only-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.3 examples/snippets/create-records/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.3 examples/snippets/stale-reads/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.3 examples/snippets/bulk-insert/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.2 examples/snippets/read-only-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.2 examples/snippets/create-records/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.2 examples/snippets/quickstart/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.2 examples/snippets/bulk-insert/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.2 examples/snippets/stale-reads/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.1 examples/snippets/create-records/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.1 examples/snippets/quickstart/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.1 examples/snippets/read-only-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.1 examples/snippets/stale-reads/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.1 examples/snippets/bulk-insert/db/migrate/01_create_tables.rb