CREATE TABLE articles_migration AS (SELECT journal_id, article_id, user_id, submission_file_id, revised_file_id, review_file_id, editor_file_id FROM articles)
CREATE TABLE article_files_migration AS (SELECT * FROM article_files)
CREATE TABLE article_galleys_migration AS (SELECT galley_id, file_id, style_file_id FROM article_galleys)
SELECT pg_catalog.setval(pg_get_serial_sequence('controlled_vocabs', 'controlled_vocab_id'), (SELECT MAX(controlled_vocab_id) FROM controlled_vocabs)+1)
SELECT pg_catalog.setval(pg_get_serial_sequence('controlled_vocab_entries', 'controlled_vocab_entry_id'), (SELECT MAX(controlled_vocab_entry_id) FROM controlled_vocab_entries)+1)