Skip to content

Commit 45b6988

Browse files
add migration to correct user id 1's authid
1 parent 1af9baf commit 45b6988

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Migration } from "../umzug";
2+
3+
const TABLE_NAME = "users";
4+
5+
export const up: Migration = async ({ context: sequelize }) => {
6+
await sequelize.getQueryInterface().bulkUpdate(
7+
TABLE_NAME,
8+
{ auth_id: "fx49Ei9zxbQf4rWrXp7ZqEk8cLi2" }, // Replace with the correct auth_id value
9+
{ id: 1 },
10+
);
11+
};
12+
13+
export const down: Migration = async ({ context: sequelize }) => {
14+
await sequelize.getQueryInterface().bulkUpdate(
15+
TABLE_NAME,
16+
{ auth_id: "ATd5GMzp8IPJzQzuQYkaavcelb32" }, // this is the previous auth_id for user with id 1
17+
{ id: 1 },
18+
);
19+
};

0 commit comments

Comments
 (0)