Commit b8ce8eb9 authored by Pavel Leshkovich's avatar Pavel Leshkovich
Browse files

fix instance_id in createTables

parent d0dd6ba6
...@@ -23,7 +23,6 @@ function * createTables() { ...@@ -23,7 +23,6 @@ function * createTables() {
\`name\` CHAR(255) NOT NULL, \`name\` CHAR(255) NOT NULL,
\`config\` TEXT NOT NULL, \`config\` TEXT NOT NULL,
\`feed_uuid\` CHAR(36) NOT NULL, \`feed_uuid\` CHAR(36) NOT NULL,
\`instance_id\` CHAR(36) NOT NULL,
PRIMARY KEY (\`id\`), PRIMARY KEY (\`id\`),
UNIQUE INDEX \`id_UNIQUE\` (\`id\` ASC) UNIQUE INDEX \`id_UNIQUE\` (\`id\` ASC)
) )
...@@ -42,6 +41,19 @@ function * createTables() { ...@@ -42,6 +41,19 @@ function * createTables() {
); );
} }
try {
yield this
.db
.queryAsync(`
ALTER TABLE \`${this.tablesNames.PROJECTS}\` ADD \`instance_id\` CHAR(36)
`);
} catch (e) {
this.logger.log(
__filename,
'instance_id column already exist'
);
}
this.logger.log( this.logger.log(
__filename, __filename,
'tables created successfully' 'tables created successfully'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment