Sha256: 308e51425c9fb1e0e6236ac626c96abf7996923000ca4cae505d9655189f6626

Contents?: true

Size: 528 Bytes

Versions: 32

Compression:

Stored size: 528 Bytes

Contents

require 'active_record'

class <%= class_name %> < ActiveRecord::Migration[7.0]

  enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto')

  # Migration suported types reference: https://guides.rubyonrails.org/v3.2/migrations.html#supported-types

  def change
    create_table :[table-name-here-in-plural], id: :uuid do |t|
      # t.belongs_to :user, type: :uuid, foreing_key: true
      # t.belongs_to :user, type: :uuid, foreing_key: true, index: { unique: true }
      t.timestamps null: false
    end
  end
end

Version data entries

32 entries across 28 versions & 1 rubygems

Version Path
rubypitaya-3.18.0 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.17.2 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.17.1 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.17.0 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.16.0 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.15.3 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.15.2 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.15.1 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.15.0 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.14.0 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.13.1 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.13.0 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.12.5 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.12.4 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.12.3 ./lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/core/templates/template_migration.rb.erb
rubypitaya-3.12.2 ./lib/rubypitaya/core/templates/template_migration.rb.erb