mirror of
https://github.com/Ratstail91/sineQL.git
synced 2025-11-29 02:34:28 +11:00
Added unique keyword
This commit is contained in:
@@ -11,6 +11,7 @@ module.exports = sequelize.define('authors', {
|
||||
},
|
||||
|
||||
name: {
|
||||
type: Sequelize.TEXT
|
||||
type: Sequelize.STRING,
|
||||
unique: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -11,11 +11,12 @@ module.exports = sequelize.define('books', {
|
||||
},
|
||||
|
||||
title: {
|
||||
type: Sequelize.TEXT
|
||||
type: Sequelize.STRING,
|
||||
unique: true
|
||||
},
|
||||
|
||||
published: {
|
||||
type: Sequelize.TEXT
|
||||
type: Sequelize.STRING
|
||||
},
|
||||
|
||||
rating: {
|
||||
|
||||
@@ -3,13 +3,13 @@ module.exports = `
|
||||
scalar Date
|
||||
|
||||
type Book {
|
||||
String title
|
||||
unique String title
|
||||
Date published
|
||||
Float rating
|
||||
}
|
||||
|
||||
type Author {
|
||||
String name
|
||||
unique String name
|
||||
Book books
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user