Skip to content
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

Merged
merged 12 commits into from
Sep 10, 2017
Merged

Create models from db schema #41

merged 12 commits into from
Sep 10, 2017

Conversation

SebastinSanty
Copy link
Member

@mukkachaitanya Can you take it on?

CREATE TABLE `student` (
`id` varchar(10) NOT NULL,
`studentName` varchar(13) NOT NULL,
`bitsId` varchar NOT NULL UNIQUE,
Copy link
Member Author

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`);
Copy link
Member Author

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

Copy link
Collaborator

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

@SebastinSanty SebastinSanty merged commit ac02825 into master Sep 10, 2017
hostelRoom: { type: StringType },
},
});
// const hostelType = new ObjectType({
Copy link
Member

@mukkachaitanya mukkachaitanya Sep 13, 2017

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants