SELECT SETVAL(pg_get_serial_sequence('users', 'user_id'), (SELECT MAX(user_id) FROM users)+1) SELECT SETVAL(pg_get_serial_sequence('auth_sources', 'auth_id'), (SELECT MAX(auth_id) FROM auth_sources)+1) SELECT SETVAL(pg_get_serial_sequence('journals', 'journal_id'), (SELECT MAX(journal_id) FROM journals)+1) SELECT SETVAL(pg_get_serial_sequence('sections', 'section_id'), (SELECT MAX(section_id) FROM sections)+1) SELECT SETVAL(pg_get_serial_sequence('issues', 'issue_id'), (SELECT MAX(issue_id) FROM issues)+1) SELECT SETVAL(pg_get_serial_sequence('articles', 'article_id'), (SELECT MAX(article_id) FROM articles)+1) SELECT SETVAL(pg_get_serial_sequence('published_articles', 'pub_id'), (SELECT MAX(pub_id) FROM published_articles)+1) SELECT SETVAL(pg_get_serial_sequence('comments', 'comment_id'), (SELECT MAX(comment_id) FROM comments)+1) SELECT SETVAL(pg_get_serial_sequence('authors', 'author_id'), (SELECT MAX(author_id) FROM authors)+1) SELECT SETVAL(pg_get_serial_sequence('article_files', 'file_id'), (SELECT MAX(file_id) FROM article_files)+1) SELECT SETVAL(pg_get_serial_sequence('article_supplementary_files', 'supp_id'), (SELECT MAX(supp_id) FROM article_supplementary_files)+1) SELECT SETVAL(pg_get_serial_sequence('article_notes', 'note_id'), (SELECT MAX(note_id) FROM article_notes)+1) SELECT SETVAL(pg_get_serial_sequence('edit_assignments', 'edit_id'), (SELECT MAX(edit_id) FROM edit_assignments)+1) SELECT SETVAL(pg_get_serial_sequence('edit_decisions', 'edit_decision_id'), (SELECT MAX(edit_decision_id) FROM edit_decisions)+1) SELECT SETVAL(pg_get_serial_sequence('review_assignments', 'review_id'), (SELECT MAX(review_id) FROM review_assignments)+1) SELECT SETVAL(pg_get_serial_sequence('article_galleys', 'galley_id'), (SELECT MAX(galley_id) FROM article_galleys)+1) SELECT SETVAL(pg_get_serial_sequence('article_event_log', 'log_id'), (SELECT MAX(log_id) FROM article_event_log)+1) SELECT SETVAL(pg_get_serial_sequence('article_email_log', 'log_id'), (SELECT MAX(log_id) FROM article_email_log)+1) SELECT SETVAL(pg_get_serial_sequence('article_comments', 'comment_id'), (SELECT MAX(comment_id) FROM article_comments)+1) SELECT SETVAL(pg_get_serial_sequence('article_email_templates', 'email_id'), (SELECT MAX(email_id) FROM email_templates_default)+1) SELECT SETVAL(pg_get_serial_sequence('email_templates', 'email_id'), (SELECT MAX(email_id) FROM email_templates)+1) SELECT SETVAL(pg_get_serial_sequence('article_search_keyword_list', 'keyword_id'), (SELECT MAX(keyword_id) FROM article_search_keyword_list)+1) SELECT SETVAL(pg_get_serial_sequence('article_search_objects', 'object_id'), (SELECT MAX(object_id) FROM article_search_objects)+1) SELECT SETVAL(pg_get_serial_sequence('rt_versions', 'version_id'), (SELECT MAX(version_id) FROM rt_versions)+1) SELECT SETVAL(pg_get_serial_sequence('rt_contexts', 'context_id'), (SELECT MAX(context_id) FROM rt_contexts)+1) SELECT SETVAL(pg_get_serial_sequence('rt_searches', 'search_id'), (SELECT MAX(search_id) FROM rt_searches)+1) SELECT SETVAL(pg_get_serial_sequence('subscription_types', 'type_id'), (SELECT MAX(type_id) FROM subscription_types)+1) SELECT SETVAL(pg_get_serial_sequence('subscriptions', 'subscription_id'), (SELECT MAX(subscription_id) FROM subscriptions)+1) SELECT SETVAL(pg_get_serial_sequence('announcement_types', 'type_id'), (SELECT MAX(type_id) FROM announcement_types)+1) SELECT SETVAL(pg_get_serial_sequence('announcements', 'announcement_id'), (SELECT MAX(announcement_id) FROM announcements)+1) SELECT SETVAL(pg_get_serial_sequence('temporary_files', 'file_id'), (SELECT MAX(file_id) FROM temporary_files)+1) SELECT SETVAL(pg_get_serial_sequence('access_keys', 'access_key_id'), (SELECT MAX(access_key_id) FROM access_keys)+1) SELECT SETVAL(pg_get_serial_sequence('groups', 'group_id'), (SELECT MAX(group_id) FROM groups)+1) UPDATE groups SET context = 1 UPDATE email_templates_default_data SET subject = 'Journal Registration', body = '{$userFullName} You have now been registered as a user with {$journalName}. We have included your username and password in this email, which are needed for all work with this journal through its website. At any point, you can ask to be removed from the journal''s list of users by contacting me. Username: {$username} Password: {$password} Thank you, {$principalContactSignature}' WHERE subject = 'New User Registration' AND body = 'Thank you for registering as a user with {$journalName}. Please keep track of your username and password, which are needed for all work with this journal. Username: {$username} Password: {$password} Thank you, {$principalContactSignature}' INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'REVIEWER_REGISTER', 'Registration as Reviewer with {$journalName}', 'In light of your expertise, we have taken the liberty of registering your name in the reviewer database for {$journalName}. This does not entail any form of commitment on your part, but simply enables us to approach you with a submission to possibly review. On being invited to review, you will have an opportunity to see the title and abstract of the paper in question, and you\'ll always be in a position to accept or decline the invitation. You can also ask at any point to have your name removed from this reviewer list. We are providing you with a username and password, which is used in all interactions with the journal through its website. You may wish, for example, to update your profile, including your reviewing interests. Username: {$username} Password: {$password} Thank you, {$principalContactSignature}', 'This email is sent to a newly registered reviewer to welcome them to the system and provide them with a record of their username and password.') INSERT INTO email_templates_default (email_key, can_edit, can_disable) VALUES ('REVIEWER_REGISTER', 1, 0) UPDATE email_templates_default_data SET body='{$copyeditorName}: I would ask that you undertake the copyediting of "{$articleTitle}" for {$journalName} by following these steps. 1. Click on the Submission URL below. 2. Log into the journal and click on the File that appears in Step 1. 3. Consult Copyediting Instructions posted on webpage. 4. Open the downloaded file and copyedit, while adding Author Queries as needed. 5. Save copyedited file, and upload to Step 1 of Copyediting. 6. Send the COMPLETE email to the editor. {$journalName} URL: {$journalUrl} Submission URL: {$submissionCopyeditingUrl} Username: {$copyeditorUsername} {$editorialContactSignature}' WHERE body='{$copyeditorName}: I would ask that you undertake the copyediting of the manuscript, "{$articleTitle}," for {$journalName}. The submission is found on the journal web site, along with a set of Instructions for Copyediting. {$journalName} URL: {$journalUrl} Manuscript URL: {$submissionCopyeditingUrl} Username: {$copyeditorUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for agreeing to undertake this important work for the journal. {$editorialContactSignature}' UPDATE email_templates_default_data SET body='{$authorName}: Your submission "{$articleTitle}" for {$journalName} has been through the first step of copyediting, and is available for you to review by following these steps. 1. Click on the Submission URL below. 2. Log into the journal and click on the File that appears in Step 1. 3. Open the downloaded submission. 4. Review the text, including copyediting proposals and Author Queries. 5. Make any copyediting changes that would further improve the text. 6. When completed, upload the file in Step 2. 7. Click on METADATA to check indexing information for completeness and accuracy. 8. Send the COMPLETE email to the editor and copyeditor. Submission URL: {$submissionCopyeditingUrl} Username: {$authorUsername} This is the last opportunity to make substantial copyediting changes to the submission. The proofreading stage, that follows the preparation of the galleys, is restricted to correcting typographical and layout errors. If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' WHERE body='{$authorName}: We have now copyedited your submission, "{$articleTitle}," for {$journalName}. To review the proposed changes and respond to Author Queries, please log into the journal web site using the link below. Download and open the Initial Copyedit File. After reviewing the copyediting, upload the file in Step 2 and send the COMPLETE email to the editor. This is the last opportunity that you have to make substantial changes. You will be asked to proofread the galleys, but at that stage we will only be able to correct minor typographical and layout errors. Manuscript URL: {$submissionCopyeditingUrl} Username: {$authorUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' UPDATE email_templates_default_data SET body='{$copyeditorName}: The author and editor have now completed their copyediting review of "{$articleTitle}" for {$journalName}. A "clean copy" now needs to be prepared for Layout by going through the following steps. 1. Click on the Submission URL below. 2. Log into the journal and click on the File that appears in Step 2. 3. Open the downloaded file and incorporate all copyedits and query responses. 4. Save clean file, and upload to Step 3 of Copyediting. 5. Click on METADATA to check indexing information (saving any corrections). 6. Send the COMPLETE email to the editor. {$journalName} URL: {$journalUrl} Submission URL: {$submissionCopyeditingUrl} Username: {$copyeditorUsername} {$editorialContactSignature}' WHERE body='{$copyeditorName}: The author and editor have now completed their review of the copyediting of the manuscript, "{$articleTitle}," for {$journalName}. The final "clean copy" can now be prepared for Layout. {$journalName} URL: {$journalUrl} Manuscript URL: {$submissionCopyeditingUrl} Username: {$copyeditorUsername} Thank you on behalf of the journal, {$editorialContactSignature}' UPDATE email_templates_default_data SET body='{$authorName}: Your submission "{$articleTitle}" to {$journalName} now needs to be proofread by folllowing these steps. 1. Click on the Submission URL below. 2. Log into the journal and view PROOFING INSTRUCTIONS 3. Click on VIEW PROOF in Layout and proof the galley in the one or more formats used. 4. Enter corrections (typographical and format) in Proofreading Corrections. 5. Save and email corrections to Layout Editor and Proofreader. 6. Send the COMPLETE email to the editor. Submission URL: {$submissionUrl} Username: {$authorUsername} {$editorialContactSignature}' WHERE body='{$authorName}: We would ask that you proofread the galleys for your submission, "{$articleTitle}," for {$journalName}. To view the galleys, please log into the journal web site using the link below. Use the VIEW PROOF link to read what will be the published version of item for typographical and layout errors only. Record these errors in the Proofreading Corrections box, following the proofing instructions provided. Manuscript URL: {$submissionUrl} Username: {$authorUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' UPDATE email_templates_default_data SET body='{$proofreaderName}: The submission "{$articleTitle}" to {$journalName} now needs to be proofread by following these steps. 1. Click on the Submission URL below. 2. Log into the journal and view PROOFING INSTRUCTIONS. 3. Click on VIEW PROOF in Layout and proof the galley in the one or more formats used. 4. Enter corrections (typographical and format) in Proofreading Corrections. 5. Save and email corrections to Layout Editor. 6. Send the COMPLETE email to the editor. Manuscript URL: {$submissionUrl} Username: {$proofreaderUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' WHERE body='{$proofreaderName}: I would ask that you proofread the galleys for the manuscript, "{$articleTitle}," for {$journalName}. {$journalName} URL: {$journalUrl} Manuscript URL: {$submissionUrl} Username: {$proofreaderUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' UPDATE email_templates_default_data SET body='{$layoutEditorName}: The submission "{$articleTitle}" to {$journalName} now needs galleys laid out by following these steps. 1. Click on the Submission URL below. 2. Log into the journal and use the Layout Version file to create the galleys according to the journal\'s standards. 3. Send the COMPLETE email to the editor. {$journalName} URL: {$journalUrl} Submission URL: {$submissionLayoutUrl} Username: {$layoutEditorUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' WHERE body='{$layoutEditorName}: I would ask that you prepare the galleys for the manuscript, "{$articleTitle}," for {$journalName}. {$journalName} URL: {$journalUrl} Manuscript URL: {$submissionLayoutUrl} Username: {$layoutEditorUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' UPDATE email_templates_default_data SET body='{$layoutEditorName}: The submission "{$articleTitle}" to {$journalName} has been proofread by the author and proofreader, and any corrections should now be made by following these steps. 1. Click on the Submission URL below. 2. Log into the journal consult Proofreading Corrections to create corrected galleys. 3. Upload the revised galleys. 3. Send the COMPLETE email in Proofreading Step 3 to the editor. {$journalName} URL: {$journalUrl} Subnmission URL: {$submissionUrl} Username: {$layoutEditorUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' WHERE body='{$layoutEditorName}: We would ask that make any corrections required as a result of proofreading the galleys for the manuscript, "{$articleTitle}," for {$journalName}. {$journalName} URL: {$journalUrl} Manuscript URL: {$submissionUrl} Username: {$layoutEditorUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$editorialContactSignature}' UPDATE email_templates_default_data SET body = '{$editorialContactName}: We have now copyedited your submission "{$articleTitle}" for {$journalName}. To review the proposed changes and respond to Author Queries, please follow these steps: 1. Log into the journal using URL below with your username and password (use Forgot link if needed). 2. Click on the file at 1. Initial Copyedit File to download and open copyedited version. 3. Review the copyediting, making changes using Track Changes in Word, and answer queries. 4. Save file to desktop and upload it in 2. Author Copyedit. 5. Click the email icon under COMPLETE and send email to the editor. This is the last opportunity that you have to make substantial changes. You will be asked at a later stage to proofread the galleys, but at that point only minor typographical and layout errors can be corrected. Manuscript URL: {$submissionEditingUrl} Username: {$authorUsername} If you are unable to undertake this work at this time or have any questions, please contact me. Thank you for your contribution to this journal. {$copyeditorName}' WHERE body = '{$editorialContactName}: I have now completed the first round of copyediting of the manuscript, "{$articleTitle}," for {$journalName}. It is now ready for the author and editor to review the changes and queries. Thank you, {$copyeditorName}' INSERT INTO email_templates_default (email_key, can_edit, can_disable) VALUES ('USER_VALIDATE', 1, 0) INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'USER_VALIDATE', 'Validate Your Account', '{$userFullName} You have created an account with {$journalName}, but before you can start using it, you need to validate your email account. To do this, simply follow the link below: {$activateUrl} Thank you, {$principalContactSignature}', 'This email is sent to a newly registered user to welcome them to the system and provide them with a record of their username and password.')