forked from groovecoder/discord
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix groovecoder#79: Never post the same comment twice
- Loading branch information
Showing
5 changed files
with
131 additions
and
24 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use strict'; | ||
module.exports = { | ||
up: function(queryInterface, Sequelize) { | ||
return queryInterface.createTable('Comments', { | ||
id: { | ||
allowNull: false, | ||
autoIncrement: true, | ||
primaryKey: true, | ||
type: Sequelize.INTEGER | ||
}, | ||
repo: { | ||
type: Sequelize.TEXT | ||
}, | ||
pr: { | ||
type: Sequelize.INTEGER | ||
}, | ||
filename: { | ||
type: Sequelize.TEXT | ||
}, | ||
line: { | ||
type: Sequelize.INTEGER | ||
}, | ||
feature: { | ||
type: Sequelize.TEXT | ||
}, | ||
createdAt: { | ||
allowNull: false, | ||
type: Sequelize.DATE | ||
}, | ||
updatedAt: { | ||
allowNull: false, | ||
type: Sequelize.DATE | ||
} | ||
}); | ||
}, | ||
down: function(queryInterface, Sequelize) { | ||
return queryInterface.dropTable('Comments'); | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
module.exports = function(sequelize, DataTypes) { | ||
var Comment = sequelize.define('Comment', { | ||
repo: DataTypes.TEXT, | ||
pr: DataTypes.INTEGER, | ||
filename: DataTypes.TEXT, | ||
line: DataTypes.INTEGER, | ||
feature: DataTypes.TEXT | ||
}, { | ||
classMethods: { | ||
associate: function(models) { | ||
// associations can be defined here | ||
} | ||
} | ||
}); | ||
return Comment; | ||
}; |
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