Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
publics
service-sdk-releases
Commits
b8ce8eb9
Commit
b8ce8eb9
authored
Oct 31, 2018
by
Pavel Leshkovich
Browse files
fix instance_id in createTables
parent
d0dd6ba6
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/createTables.js
View file @
b8ce8eb9
...
@@ -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
'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment