-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #406 from bluewave-labs/develop
Develop
- Loading branch information
Showing
184 changed files
with
23,740 additions
and
5,349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
# Test Environment Configuration | ||
|
||
# Database Configuration | ||
TEST_DB_USERNAME=test_user | ||
TEST_DB_PASSWORD=test_password | ||
TEST_DB_NAME=test_db | ||
TEST_DB_USERNAME=user123 | ||
TEST_DB_PASSWORD=password123 | ||
TEST_DB_NAME=onboarding_db_test | ||
TEST_DB_HOST=localhost | ||
TEST_DB_PORT=5432 | ||
|
||
POSTGRES_USER=user123 | ||
POSTGRES_PASSWORD=password123 | ||
POSTGRES_DB=onboarding_db_test | ||
|
||
# JWT Secret Key | ||
JWT_SECRET=your_test_jwt_secret_key_here | ||
|
||
# Allowed IP range for the API "baseIp/rangeStart-rangeEnd" (e.g. 192.168.1/1-255) separated by comma | ||
ALLOWED_IP_RANGE=11.22.33/10-200, 192.168.65/1-255 | ||
# Allowed IP addresses for the API separated by comma | ||
ALLOWED_IPS=127.0.0.1, 11.22.33.44, 11.22.33.45, 11.22.33.46, 192.168.65.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules/ | |
.env | ||
logs/ | ||
dist/ | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
backend/migrations/20241203005208-change-popup-log-to-guide-log.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
'use strict'; | ||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
up: async (queryInterface, Sequelize) => { | ||
const transaction = await queryInterface.sequelize.transaction(); | ||
try { | ||
await queryInterface.renameTable('popup_logs', 'guide_logs', { transaction }); | ||
await queryInterface.renameColumn('guide_logs', 'popupType', 'guideType', { transaction }); | ||
|
||
await queryInterface.sequelize.query(` | ||
ALTER TABLE "guide_logs" | ||
ALTER COLUMN "guideType" TYPE INTEGER | ||
USING | ||
CASE | ||
WHEN "guideType" = 'guide' THEN 1 | ||
WHEN "guideType" = 'tooltip' THEN 2 | ||
WHEN "guideType" = 'hotspot' THEN 3 | ||
WHEN "guideType" = 'checklist' THEN 4 | ||
ELSE 9 | ||
END | ||
`, { transaction }); | ||
|
||
await queryInterface.changeColumn('guide_logs', 'guideType', { | ||
type: Sequelize.INTEGER, | ||
allowNull: false, | ||
}, { transaction }); | ||
|
||
await queryInterface.addColumn('guide_logs', 'guideId', { | ||
type: Sequelize.INTEGER, | ||
allowNull: false, | ||
defaultValue: 0, | ||
}, { transaction }); | ||
|
||
await queryInterface.addIndex('guide_logs', ['userId'], { | ||
name: 'idx_guide_logs_userId', | ||
transaction, | ||
}); | ||
await queryInterface.addIndex('guide_logs', ['guideId'], { | ||
name: 'idx_guide_logs_guideId', | ||
transaction, | ||
}); | ||
await queryInterface.addIndex('guide_logs', ['guideType'], { | ||
name: 'idx_guide_logs_guideType', | ||
transaction, | ||
}); | ||
await queryInterface.addIndex('guide_logs', ['userId', 'guideId', 'guideType'], { | ||
name: 'idx_guide_logs_userId_guideId_guideType', | ||
unique: false, | ||
transaction, | ||
}); | ||
|
||
await transaction.commit(); | ||
} catch (error) { | ||
await transaction.rollback(); | ||
throw error; | ||
} | ||
}, | ||
|
||
down: async (queryInterface, Sequelize) => { | ||
const transaction = await queryInterface.sequelize.transaction(); | ||
try { | ||
await queryInterface.renameTable('guide_logs', 'popup_logs', { transaction }); | ||
await queryInterface.renameColumn('popup_logs', 'guideType', 'popupType', { transaction }); | ||
|
||
await queryInterface.sequelize.query(` | ||
ALTER TABLE "popup_logs" | ||
ALTER COLUMN "popupType" TYPE VARCHAR(255) | ||
USING | ||
CASE | ||
WHEN "popupType" = 1 THEN 'guide' | ||
WHEN "popupType" = 2 THEN 'tooltip' | ||
WHEN "popupType" = 3 THEN 'hotspot' | ||
WHEN "popupType" = 4 THEN 'checklist' | ||
ELSE 'guide' | ||
END | ||
`, { transaction }); | ||
|
||
await queryInterface.changeColumn('popup_logs', 'popupType', { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
validate: { | ||
isIn: [['guide', 'tooltip', 'hotspot', 'checklist']], | ||
} | ||
}, { transaction }); | ||
|
||
await queryInterface.removeColumn('popup_logs', 'guideId', { transaction }); | ||
|
||
await queryInterface.removeIndex('popup_logs', 'idx_guide_logs_userId', { transaction }); | ||
await queryInterface.removeIndex('popup_logs', 'idx_guide_logs_guideId', { transaction }); | ||
await queryInterface.removeIndex('popup_logs', 'idx_guide_logs_guideType', { transaction }); | ||
await queryInterface.removeIndex('popup_logs', 'idx_guide_logs_userId_guideId_guideType', { transaction }); | ||
|
||
await transaction.commit(); | ||
} catch (error) { | ||
await transaction.rollback(); | ||
throw error; | ||
} | ||
}, | ||
}; |
18 changes: 18 additions & 0 deletions
18
backend/migrations/20241210225728-add-action-url-banner.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use strict"; | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.addColumn("banners", "actionUrl", { | ||
type: Sequelize.STRING, | ||
allowNull: true, | ||
validate: { | ||
isUrl: true, | ||
}, | ||
}); | ||
}, | ||
|
||
async down(queryInterface, Sequelize) { | ||
await queryInterface.removeColumn("banners", "actionUrl"); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use strict"; | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.addColumn("popup", "actionUrl", { | ||
type: Sequelize.STRING, | ||
allowNull: true, | ||
validate: { | ||
isUrl: true, | ||
}, | ||
}); | ||
}, | ||
|
||
async down(queryInterface, Sequelize) { | ||
await queryInterface.removeColumn("popup", "actionUrl"); | ||
}, | ||
}; |
14 changes: 14 additions & 0 deletions
14
backend/migrations/20241216195934-server_url_col_team_rel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
async up (queryInterface, Sequelize) { | ||
await queryInterface.addColumn('teams', 'serverUrl', { | ||
type: Sequelize.STRING(255), | ||
allowNull: true, | ||
}) | ||
}, | ||
|
||
async down (queryInterface, Sequelize) { | ||
await queryInterface.removeColumn('teams', 'serverUrl') | ||
} | ||
}; |
Oops, something went wrong.