Update migrations
This commit is contained in:
parent
4acb86c4c0
commit
392f580648
@ -1,4 +1,4 @@
|
||||
class DeviseCreateUsers < ActiveRecord::Migration
|
||||
class DeviseCreateUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table(:users) do |t|
|
||||
## Database authenticatable
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddNameToUsers < ActiveRecord::Migration
|
||||
class AddNameToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :name, :string
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddConfirmableToUsers < ActiveRecord::Migration
|
||||
class AddConfirmableToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :confirmation_token, :string
|
||||
add_column :users, :confirmed_at, :datetime
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddRoleToUsers < ActiveRecord::Migration
|
||||
class AddRoleToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :role, :integer
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class DeviseInvitableAddToUsers < ActiveRecord::Migration
|
||||
class DeviseInvitableAddToUsers < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
change_table :users do |t|
|
||||
t.string :invitation_token
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class CreateGames < ActiveRecord::Migration
|
||||
class CreateGames < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :games do |t|
|
||||
t.string :title
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class CreatePlayers < ActiveRecord::Migration
|
||||
class CreatePlayers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :players do |t|
|
||||
t.references :game, index: true
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class CreatePlayerCards < ActiveRecord::Migration
|
||||
class CreatePlayerCards < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :player_cards do |t|
|
||||
t.references :player, index: true
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddStatusToGames < ActiveRecord::Migration
|
||||
class AddStatusToGames < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :games, :status, :string
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddAttrsToPlayerCards < ActiveRecord::Migration
|
||||
class AddAttrsToPlayerCards < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :player_cards, :value, :integer
|
||||
add_column :player_cards, :rank, :string
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddControlPlayerIdToGame < ActiveRecord::Migration
|
||||
class AddControlPlayerIdToGame < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :games, :control_player_id, :integer
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class CreatePlays < ActiveRecord::Migration
|
||||
class CreatePlays < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :plays do |t|
|
||||
t.references :game, index: true
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddPlayIdToPlayerCard < ActiveRecord::Migration
|
||||
class AddPlayIdToPlayerCard < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :player_cards, :play_id, :integer
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddPlayToBeatToGame < ActiveRecord::Migration
|
||||
class AddPlayToBeatToGame < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :games, :play_to_beat, index: true
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class PlayToBeat < ActiveRecord::Migration
|
||||
class PlayToBeat < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :play_to_beats do |t|
|
||||
t.integer :game_id
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddWinnerPlayerIdToGame < ActiveRecord::Migration
|
||||
class AddWinnerPlayerIdToGame < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :games, :winner_player_id, :integer
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class RenameControlPlayerIdToControllingPlayerId < ActiveRecord::Migration
|
||||
class RenameControlPlayerIdToControllingPlayerId < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
rename_column :games, :control_player_id, :controlling_player_id
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class CreateTables < ActiveRecord::Migration
|
||||
class CreateTables < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :tables do |t|
|
||||
t.string :title
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class CreateSeats < ActiveRecord::Migration
|
||||
class CreateSeats < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :seats do |t|
|
||||
t.references :table, index: true
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddCurrentGameIdToTable < ActiveRecord::Migration
|
||||
class AddCurrentGameIdToTable < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :tables, :current_game_id, :integer
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddTableIdToGames < ActiveRecord::Migration
|
||||
class AddTableIdToGames < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :games, :table_id, :integer
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddSoftTokenToUsersAndPlayers < ActiveRecord::Migration
|
||||
class AddSoftTokenToUsersAndPlayers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :soft_token, :string
|
||||
add_column :players, :soft_token, :string
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddPositionToSeats < ActiveRecord::Migration
|
||||
class AddPositionToSeats < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :seats, :position, :integer
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddUserSoftTokenToSeats < ActiveRecord::Migration
|
||||
class AddUserSoftTokenToSeats < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :seats, :user_soft_token, :string
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddGameIdToSeats < ActiveRecord::Migration
|
||||
class AddGameIdToSeats < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :seats, :game_id, :integer
|
||||
end
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
class AddPlayerIdToSeat < ActiveRecord::Migration
|
||||
class AddPlayerIdToSeat < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :seats, :player_id, :integer
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user