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/20180114170238_cache_current_pokemon_revision.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'db/migrate/20180114170238_cache_current_pokemon_revision.rb') diff --git a/db/migrate/20180114170238_cache_current_pokemon_revision.rb b/db/migrate/20180114170238_cache_current_pokemon_revision.rb index a0e1747..8b1d6ff 100644 --- a/db/migrate/20180114170238_cache_current_pokemon_revision.rb +++ b/db/migrate/20180114170238_cache_current_pokemon_revision.rb @@ -1,10 +1,10 @@ class CacheCurrentPokemonRevision < ActiveRecord::Migration[5.1] def up - change_table :pokeviewer_pokemon do |t| + change_table :pokemon do |t| t.references :current, null: true end - add_foreign_key :pokeviewer_pokemon, :pokeviewer_revisions, + add_foreign_key :pokemon, :revisions, column: :current_id Pokeviewer::Pokemon.all.each do |p| @@ -14,6 +14,6 @@ class CacheCurrentPokemonRevision < ActiveRecord::Migration[5.1] end def down - remove_column :pokeviewer_pokemon, :current_id + remove_column :pokemon, :current_id end end -- cgit 1.4.1