Sha256: 7929513762c871205f2c80476b742c3ad921596634332a2a129948dc704dff86

Contents?: true

Size: 318 Bytes

Versions: 7

Compression:

Stored size: 318 Bytes

Contents

require 'active_record'

class CreatePlayerMigration < ActiveRecord::Migration[7.0]

  def change
    create_table :players do |t|
      t.belongs_to :user, foreing_key: true, index: { unique: true }
      t.string :name, null: false
      t.integer :gold, null: false
      t.timestamps null: false
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rubypitaya-3.19.6 ./lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb
rubypitaya-3.19.5 ./lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb
rubypitaya-3.19.4 ./lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb
rubypitaya-3.19.3 ./lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb
rubypitaya-3.19.2 ./lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb
rubypitaya-3.19.1 ./lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb
rubypitaya-3.19.0 ./lib/rubypitaya/app-template/app/migrations/1606736477_create_player_migration.rb