Sha256: 37c96eb6e9913a3c4bc400d9cf08ad5fa0057c45f468c15984a83c65f84c67f9

Contents?: true

Size: 556 Bytes

Versions: 42

Compression:

Stored size: 556 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.numeric :marketing_budget
        t.references :singer, index: false, foreign_key: true
      end
    end
  end
end

Version data entries

42 entries across 21 versions & 1 rubygems

Version Path
activerecord-spanner-adapter-1.4.0 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.4.0 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.3.1 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.3.1 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.2 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.2 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.1 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.1 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.0 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.0 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.1.0 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.1.0 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.0.1 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.0.1 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.0.0 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.0.0 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-0.7.0 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-0.7.0 examples/snippets/mutations/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-0.6.0 examples/snippets/read-write-transactions/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-0.6.0 examples/snippets/mutations/db/migrate/01_create_tables.rb