From 56f5841d4b9c12296cdfcaeff174b2627d59afc8 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 7 Dec 2024 11:49:49 -0500 Subject: Migrate to full rails app --- db/migrate/20180113200119_move_species_to_revision.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'db/migrate/20180113200119_move_species_to_revision.rb') diff --git a/db/migrate/20180113200119_move_species_to_revision.rb b/db/migrate/20180113200119_move_species_to_revision.rb index 8b94d48..9f84c51 100644 --- a/db/migrate/20180113200119_move_species_to_revision.rb +++ b/db/migrate/20180113200119_move_species_to_revision.rb @@ -1,6 +1,6 @@ class MoveSpeciesToRevision < ActiveRecord::Migration[5.1] def up - change_table :pokeviewer_revisions do |t| + change_table :revisions do |t| t.references :species, null: true end @@ -9,17 +9,17 @@ class MoveSpeciesToRevision < ActiveRecord::Migration[5.1] r.save! end - remove_column :pokeviewer_pokemon, :species_id + remove_column :pokemon, :species_id - change_column_null :pokeviewer_revisions, :species_id, false + change_column_null :revisions, :species_id, false - add_foreign_key :pokeviewer_revisions, :pokeviewer_species, + add_foreign_key :revisions, :species, column: :species_id end def down def up - change_table :pokeviewer_pokemon do |t| + change_table :pokemon do |t| t.references :species, null: true end @@ -28,11 +28,11 @@ class MoveSpeciesToRevision < ActiveRecord::Migration[5.1] p.save! end - remove_column :pokeviewer_revisions, :species_id + remove_column :revisions, :species_id - change_column_null :pokeviewer_pokemon, :species_id, false + change_column_null :pokemon, :species_id, false - add_foreign_key :pokeviewer_pokemon, :pokeviewer_species, + add_foreign_key :pokemon, :species, column: :species_id end end -- cgit 1.4.1