diff --git a/hammond-data/migrations/2017-12-09-125835_change_episode_pk/down.sql b/hammond-data/migrations/2017-12-09-125835_change_episode_pk/down.sql index 01f66ff..866e08f 100644 --- a/hammond-data/migrations/2017-12-09-125835_change_episode_pk/down.sql +++ b/hammond-data/migrations/2017-12-09-125835_change_episode_pk/down.sql @@ -16,4 +16,8 @@ CREATE TABLE episode ( podcast_id INTEGER NOT NULL ); -INSERT INTO episode SELECT * FROM old_table; \ No newline at end of file +INSERT INTO episode (title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id) +SELECT title, uri, local_uri, description, published_date, epoch, length, guid, played, favorite, archive, podcast_id +FROM old_table; + +Drop table old_table; \ No newline at end of file diff --git a/hammond-data/migrations/2017-12-09-125835_change_episode_pk/up.sql b/hammond-data/migrations/2017-12-09-125835_change_episode_pk/up.sql index cbe40dd..2a8d1c0 100644 --- a/hammond-data/migrations/2017-12-09-125835_change_episode_pk/up.sql +++ b/hammond-data/migrations/2017-12-09-125835_change_episode_pk/up.sql @@ -2,7 +2,7 @@ ALTER TABLE episode RENAME TO old_table; CREATE TABLE episode ( title TEXT NOT NULL, - uri TEXT UNIQUE, + uri TEXT, local_uri TEXT, description TEXT, published_date TEXT,