Sha256: 3a2e25259cf2631044f6e4e4e11ec696b5d64854915042c25f14a2e43b9eb594

Contents?: true

Size: 425 Bytes

Versions: 21

Compression:

Stored size: 425 Bytes

Contents

class CreateJobshopDashboards < ActiveRecord::Migration[5.0]
  def change
    enable_extension "pgcrypto" unless extension_enabled?("pgcrypto")

    create_table(:jobshop_dashboards, id: :uuid,
                 default: "gen_random_uuid()")do |t|
      t.uuid :site_id

      t.timestamps
    end

    add_foreign_key(:jobshop_dashboards, :jobshop_sites, column: "site_id",
                    on_delete: :cascade)
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
jobshop-0.0.5 db/migrate/20160417210218_create_jobshop_dashboards.rb