-
Notifications
You must be signed in to change notification settings - Fork 1
Forms UI and Profile Update #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b927b3f
7446e85
19b7b35
b911731
47ebac0
df77c0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| 'use strict'; | ||
|
|
||
| module.exports = { | ||
| async up(queryInterface, Sequelize) { | ||
| await queryInterface.addColumn('Users', 'resetOTP', { | ||
| type: Sequelize.STRING(10), | ||
| allowNull: true, | ||
| comment: '6-digit OTP for password reset' | ||
|
Comment on lines
+5
to
+8
|
||
| }); | ||
|
|
||
| await queryInterface.addColumn('Users', 'resetOTPExpiry', { | ||
| type: Sequelize.DATE, | ||
| allowNull: true, | ||
| comment: 'Expiration time of the reset OTP' | ||
| }); | ||
| }, | ||
|
|
||
| async down(queryInterface, Sequelize) { | ||
| await queryInterface.removeColumn('Users', 'resetOTP'); | ||
| await queryInterface.removeColumn('Users', 'resetOTPExpiry'); | ||
| } | ||
| }; | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'use strict'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** @type {import('sequelize-cli').Migration} */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| module.exports = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| async up (queryInterface, Sequelize) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Add altering commands here. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * await queryInterface.createTable('users', { id: Sequelize.INTEGER }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| async down (queryInterface, Sequelize) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Add reverting commands here. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * await queryInterface.dropTable('users'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+22
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** @type {import('sequelize-cli').Migration} */ | |
| module.exports = { | |
| async up (queryInterface, Sequelize) { | |
| /** | |
| * Add altering commands here. | |
| * | |
| * Example: | |
| * await queryInterface.createTable('users', { id: Sequelize.INTEGER }); | |
| */ | |
| }, | |
| async down (queryInterface, Sequelize) { | |
| /** | |
| * Add reverting commands here. | |
| * | |
| * Example: | |
| * await queryInterface.dropTable('users'); | |
| */ | |
| } | |
| }; | |
| /** | |
| * This file is intentionally left empty. | |
| * | |
| * The actual "add reset OTP fields" migration is implemented in: | |
| * 20251220000000-add-reset-otp-fields.cjs | |
| * | |
| * This .js stub exists only to prevent confusion; it is not used as a | |
| * Sequelize migration and exports no migration logic. | |
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README.md references npm scripts (db:migrate, db:seed, db:reset) that don't exist in package.json. These scripts need to be added to package.json, or the README documentation should be updated to use the correct commands (e.g., npx sequelize-cli db:migrate).
To reset the entire database (Undo all migrations, remigrate, and re-seed):