-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
102 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
module.exports = { | ||
up: (queryInterface, Sequelize) => { | ||
return queryInterface.createTable("collection", | ||
{ | ||
id:{ | ||
type: Sequelize.BIGINT, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
allowNull: false | ||
}, | ||
up: (queryInterface, Sequelize) => { | ||
return queryInterface.createTable("collection", | ||
{ | ||
id:{ | ||
type: Sequelize.BIGINT, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
allowNull: false | ||
}, | ||
|
||
slang:{ | ||
type: Sequelize.STRING (150), | ||
allowNull: false, | ||
}, | ||
slang:{ | ||
type: Sequelize.STRING (150), | ||
allowNull: false | ||
}, | ||
|
||
name:{ | ||
type: Sequelize.STRING (45), | ||
allowNull: false, | ||
}, | ||
name:{ | ||
type: Sequelize.STRING (45), | ||
allowNull: false | ||
}, | ||
|
||
description:{ | ||
type: Sequelize.STRING (300), | ||
allowNull: false | ||
}, | ||
description:{ | ||
type: Sequelize.STRING (300), | ||
allowNull: false | ||
}, | ||
|
||
public:{ | ||
type: Sequelize.BOOLEAN, | ||
allowNull: false, | ||
defaultValue: false | ||
}, | ||
public:{ | ||
type: Sequelize.BOOLEAN, | ||
allowNull: false, | ||
defaultValue: false | ||
}, | ||
|
||
owner:{ | ||
type: Sequelize.BIGINT, | ||
allowNull: false, | ||
references: { model: "usuario_base", key: "id" }, | ||
onUpdate: "CASCADE", | ||
onDelete: "RESTRICT" | ||
} | ||
}, | ||
{ | ||
charset: "utf8", | ||
collate: "utf8_general_ci" | ||
} | ||
) | ||
.then( | ||
() => { | ||
return queryInterface.bulkInsert('collection', | ||
[ | ||
{ | ||
name: 'Cervix', | ||
description: 'This Image represent the cytopathologist of the uterine cervix using conventional smear (Pap smear). The Epithelial cell abonormalities (lesion) are adressed in six classes according to Bethesda System.', | ||
slang: 'cervix', | ||
public: true, | ||
owner: 1 | ||
} | ||
] | ||
); | ||
} | ||
) | ||
}, | ||
owner:{ | ||
type: Sequelize.BIGINT, | ||
allowNull: false, | ||
references: { model: "usuario_base", key: "id" }, | ||
onUpdate: "CASCADE", | ||
onDelete: "RESTRICT" | ||
} | ||
}, | ||
{ | ||
charset: "utf8", | ||
collate: "utf8_general_ci" | ||
} | ||
) | ||
.then( | ||
() => { | ||
return queryInterface.bulkInsert("collection", | ||
[ | ||
{ | ||
name: "Cervix", | ||
description: "This Image represent the cytopathologist of the uterine cervix using conventional smear (Pap smear). The Epithelial cell abonormalities (lesion) are adressed in six classes according to Bethesda System.", | ||
slang: "cervix", | ||
public: true, | ||
owner: 1 | ||
} | ||
] | ||
); | ||
} | ||
); | ||
}, | ||
|
||
down: (queryInterface, Sequelize) => { | ||
return queryInterface.dropTable("collection"); | ||
} | ||
down: (queryInterface, Sequelize) => { | ||
return queryInterface.dropTable("collection"); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters