-
Notifications
You must be signed in to change notification settings - Fork 241
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
foreign key doesnt create in mysql #347
Comments
var Movie = schema.define('Movie', { }); var Movie_detail = schema.define('Movie_detail', { Movie_detail.belongsTo(Movie, {as: 'movie', foreignKey: 'movie_id'}); schema.automigrate(); Doesnt work |
So far as I know relations test does pass currently, though: https://github.com/1602/jugglingdb/blob/master/test/relations.test.js. |
Not confirmed:
CREATE TABLE `Movie` (
`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` VARCHAR(150) NULL,
`sinopsis` VARCHAR(255) NULL,
`url_trailer` VARCHAR(150) NULL,
`type` VARCHAR(30) NULL,
`casting` VARCHAR(255) NULL,
`duration` VARCHAR(10) NULL,
`date` DATETIME NULL,
`country` VARCHAR(100) NULL,
`director` VARCHAR(100) NULL
)
CREATE TABLE `Movie_detail` (
`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`movie_id` int(11) NULL,
`showtime` VARCHAR(10) NULL,
`point_id` int(11) NULL
) |
Not created foreign key |
Foreign key doesnt create in mysql
The text was updated successfully, but these errors were encountered: