Sha256: d03ea79accd644d1a5b5410c9653d33bf1dc68d4065f138b5672c4724837b254

Contents?: true

Size: 454 Bytes

Versions: 4

Compression:

Stored size: 454 Bytes

Contents

class Post < ActiveRecord::Base
  self.table_name = "bar.posts"
end

class Comment < ActiveRecord::Base
  self.table_name = "foo.comments"
end

ActiveRecord::Schema.define do
  create_schema("foo")
  create_schema("bar")
  create_table("bar.posts") do |t|
    t.string :title
    t.text :body
  end

  create_table("foo.comments") do |t|
    t.integer :post_id
    t.text :body
  end

  add_foreign_key "foo.comments", "bar.posts", column: "post_id"
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activerecord-cockroachdb-adapter-8.0.0 bin/console_schemas/schemas.rb
activerecord-cockroachdb-adapter-7.2.0 bin/console_schemas/schemas.rb
activerecord-cockroachdb-adapter-7.1.1 bin/console_schemas/schemas.rb
activerecord-cockroachdb-adapter-7.1.0 bin/console_schemas/schemas.rb