Sha256: 7b7d406934d5d2f914c4bc07e5e50aff750bc334d10a16209c803437ddf6bf06

Contents?: true

Size: 557 Bytes

Versions: 19

Compression:

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

Version Path
activerecord-spanner-adapter-1.6.3 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.2 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.1 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.6.0 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.5.1 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.5.0 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.4.4 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.4.3 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.4.2 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.4.1 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.4.0 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.3.1 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.2 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.1 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.2.0 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.1.0 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.0.1 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-1.0.0 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb
activerecord-spanner-adapter-0.7.0 examples/snippets/partitioned-dml/db/migrate/01_create_tables.rb