Skip to content

Commit 73e67d0

Browse files
committed
convert sequelize migration files to commonjs as sequelize does not support module syntax
1 parent 2a8f43f commit 73e67d0

24 files changed

Lines changed: 29 additions & 29 deletions

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
- ./db-data:/var/lib/postgresql/data
1414

1515
snapsmaps:
16-
image: shaneisrael/snapsmaps:latest
16+
image: snapsmaps:test
1717
container_name: snapsmaps
1818
restart: always
1919
depends_on:

server/.sequelizerc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const path = require("path");
1+
const path = require('path')
22

33
module.exports = {
4-
config: path.resolve("src", "database", "config", "database.js"),
5-
"models-path": path.resolve("src", "database", "models"),
6-
"seeders-path": path.resolve("src", "database", "seeders"),
7-
"migrations-path": path.resolve("src", "database", "migrations"),
8-
};
4+
config: path.resolve('src', 'database', 'config', 'database.js'),
5+
'models-path': path.resolve('src', 'database', 'models'),
6+
'seeders-path': path.resolve('src', 'database', 'seeders'),
7+
'migrations-path': path.resolve('src', 'database', 'migrations'),
8+
}

server/src/database/migrations/20230723020226-create-user.js renamed to server/src/database/migrations/20230723020226-create-user.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
up: async (queryInterface, Sequelize) => {
33
await queryInterface.createTable('users', {
44
id: {

server/src/database/migrations/20240329235510-create-post.js renamed to server/src/database/migrations/20240329235510-create-post.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
up: async (queryInterface, Sequelize) => {
33
await queryInterface.createTable('posts', {
44
id: {

server/src/database/migrations/20240330001603-create-image.js renamed to server/src/database/migrations/20240330001603-create-image.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
up: async (queryInterface, Sequelize) => {
33
await queryInterface.createTable('images', {
44
id: {

server/src/database/migrations/20240330002538-create-post-comment.js renamed to server/src/database/migrations/20240330002538-create-post-comment.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
up: async (queryInterface, Sequelize) => {
33
await queryInterface.createTable('postComments', {
44
id: {

server/src/database/migrations/20240330003433-create-post-like.js renamed to server/src/database/migrations/20240330003433-create-post-like.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
up: async (queryInterface, Sequelize) => {
33
await queryInterface.createTable('postLikes', {
44
id: {

server/src/database/migrations/20240330003736-create-follow.js renamed to server/src/database/migrations/20240330003736-create-follow.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
up: async (queryInterface, Sequelize) => {
33
await queryInterface.createTable('follows', {
44
id: {

server/src/database/migrations/20240403235627-update-models-to-paranoid.js renamed to server/src/database/migrations/20240403235627-update-models-to-paranoid.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
up: async (queryInterface, Sequelize) => {
33
await queryInterface.addColumn('users', 'deletedAt', { allowNull: true, type: Sequelize.DATE })
44
await queryInterface.addColumn('posts', 'deletedAt', { allowNull: true, type: Sequelize.DATE })

server/src/database/migrations/20240412165948-add-follow-count-to-profile.js renamed to server/src/database/migrations/20240412165948-add-follow-count-to-profile.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
module.exports = {
22
up: async (queryInterface, Sequelize) => {
33
await queryInterface.addColumn('users', 'followingCount', {
44
allowNull: false,

0 commit comments

Comments
 (0)