Skip to content

Commit b528281

Browse files
author
crrochon
committed
Comment Deletion on PhoneNumbers table.
Deleted the comments explaining the differences required to create working Models
1 parent 835a45c commit b528281

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

server/models/PhoneNumbers.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
module.exports = (sequelize, DataTypes) => {
22
return sequelize.define(
3-
'PhoneNumbers', // Leave as non-spaced word
3+
'PhoneNumbers',
44
{
5-
// The issue seems to be limited to the constraints. For future reference, here is a link to the docs:
6-
// https://sequelize.org/docs/v7/core-concepts/validations-and-constraints/
7-
// TODO: Delete me! - There can only be one primary key
85

96
phoneNumberId:{
107
type: DataTypes.INTEGER,
@@ -16,11 +13,7 @@ module.exports = (sequelize, DataTypes) => {
1613
alias: 'Phone Number ID',
1714
aliasValue: 'phoneNumberId',
1815
},
19-
20-
// TODO: Delete me! - Removing primary key from all other attributes will fix it
21-
// TODO: Delete me! - There is another issue. autoIncrement will do a +1 in the SQL table.
22-
// TODO: Delete me! - Since this is a reference to driverID/elderID, we don't want that (we want to specify the ID manually)
23-
// TODO: Delete me! - So, we can remove the autoIncrement as well. Additionally, this should be an int
16+
2417
referenceId:{
2518
type: DataTypes.INTEGER,
2619
allowNull: false,
@@ -30,7 +23,6 @@ module.exports = (sequelize, DataTypes) => {
3023
aliasValue: 'referenceId',
3124
},
3225

33-
// TODO: Delete me! - If an attribute is empty, leave it commented out until you know what to do with it.
3426
// referenceType:{
3527

3628
// },
@@ -72,7 +64,7 @@ module.exports = (sequelize, DataTypes) => {
7264
},
7365
},
7466
{
75-
tableName: "PhoneNumbers", // leave as non-spaced word
67+
tableName: "PhoneNumbers",
7668
timeStamps: false,
7769
}
7870
)

0 commit comments

Comments
 (0)