-
Notifications
You must be signed in to change notification settings - Fork 9
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
Create models from db schema #41
Conversation
src/data/models.sql
Outdated
CREATE TABLE `student` ( | ||
`id` varchar(10) NOT NULL, | ||
`studentName` varchar(13) NOT NULL, | ||
`bitsId` varchar NOT NULL UNIQUE, |
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.
mysql needs a definite varchar length. This has to be changed across all the fields with no length provided
|
||
ALTER TABLE `transaction` ADD CONSTRAINT `transaction_fk2` FOREIGN KEY (`optionId`) REFERENCES `merchandiseOption`(`id`); | ||
|
||
ALTER TABLE `messBill` ADD CONSTRAINT `messBill_fk0` FOREIGN KEY (`studentId`) REFERENCES `student`(`id`); |
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.
This line is giving me an error too.
ERROR 1215 (HY000) at line 272: Cannot add foreign key constraint
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.
there was a conflicting variable type.. i am fixing it
Search function regressed
hostelRoom: { type: StringType }, | ||
}, | ||
}); | ||
// const hostelType = new ObjectType({ |
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.
Can I know why was this change made? i.e. HostelType
being commented?
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.
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.
Maybe because we have changed the hostel table.. now its hostelPs
. Basically its connected to two different tables hostel
and ps
where hostel or ps details are stored respectively. But I am not sure, I didnt make this change.
@mukkachaitanya Can you take it on?