it("should create a comment for a column",function(done){
it("should create a comment for a column",function(){
varself=this
varself=this
,User=this.sequelize.define('User',{
,User=this.sequelize.define('User',{
username:{type:DataTypes.STRING,comment:'Some lovely info for my DBA'}
username:{type:DataTypes.STRING,comment:'Some lovely info for my DBA'}
})
});
User.sync({force:true}).success(function(){
returnUser.sync({force:true}).then(function(){
varsql=''
varsql='';
if(Support.dialectIsMySQL()){
if(Support.dialectIsMySQL()){
sql='SELECT COLUMN_COMMENT as cmt FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = \''+self.sequelize.config.database+'\' AND TABLE_NAME = \'Users\' AND COLUMN_NAME = \'username\'';
sql='SELECT COLUMN_COMMENT as cmt FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = \''+self.sequelize.config.database+'\' AND TABLE_NAME = \'Users\' AND COLUMN_NAME = \'username\'';
}
}
...
@@ -30,19 +32,14 @@ describe(Support.getTestDialectTeaser("QueryGenerators"), function () {
...
@@ -30,19 +32,14 @@ describe(Support.getTestDialectTeaser("QueryGenerators"), function () {
}
}
elseif(dialect==="sqlite"){
elseif(dialect==="sqlite"){
// sqlite doesn't support comments except for explicit comments in the file
// sqlite doesn't support comments except for explicit comments in the file
expect(true).to.be.true
expect(true).to.be.true;
returndone()
return;
}else{
console.log('FIXME: This dialect is not supported :(');