Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
Fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Macludde committed Sep 6, 2023
1 parent c916aaf commit 624e234
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ export async function down(knex: Knex): Promise<void> {
});
await knex.raw(`
UPDATE articles
SET author_id = authors.member_id
SET author_id = authors.member_id,
author_type = 'Member'
FROM authors
WHERE authors.id = articles.author_id
AND authors.type = 'Member'
`);
await knex.raw(`
UPDATE articles
SET author_id = authors.mandate_id
SET author_id = authors.mandate_id,
author_type = 'Mandate'
FROM authors
WHERE authors.id = articles.author_id
Expand Down

0 comments on commit 624e234

Please sign in to comment.