Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
c50f4f4c
Commit
c50f4f4c
authored
Dec 09, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update migration scripts
parent
fa34a7af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
version.go
server/version/version.go
+2
-2
LATEST__SCHEMA.sql
store/db/mysql/migration/prod/LATEST__SCHEMA.sql
+12
-0
LATEST__SCHEMA.sql
store/db/sqlite/migration/dev/LATEST__SCHEMA.sql
+1
-0
LATEST__SCHEMA.sql
store/db/sqlite/migration/prod/LATEST__SCHEMA.sql
+14
-0
No files found.
server/version/version.go
View file @
c50f4f4c
...
@@ -9,10 +9,10 @@ import (
...
@@ -9,10 +9,10 @@ import (
// Version is the service current released version.
// Version is the service current released version.
// Semantic versioning: https://semver.org/
// Semantic versioning: https://semver.org/
var
Version
=
"0.1
7.1
"
var
Version
=
"0.1
8.0
"
// DevVersion is the service current development version.
// DevVersion is the service current development version.
var
DevVersion
=
"0.1
7.1
"
var
DevVersion
=
"0.1
8.0
"
func
GetCurrentVersion
(
mode
string
)
string
{
func
GetCurrentVersion
(
mode
string
)
string
{
if
mode
==
"dev"
||
mode
==
"demo"
{
if
mode
==
"dev"
||
mode
==
"demo"
{
...
...
store/db/mysql/migration/prod/LATEST__SCHEMA.sql
View file @
c50f4f4c
...
@@ -12,6 +12,7 @@ DROP TABLE IF EXISTS `activity`;
...
@@ -12,6 +12,7 @@ DROP TABLE IF EXISTS `activity`;
DROP
TABLE
IF
EXISTS
`storage`
;
DROP
TABLE
IF
EXISTS
`storage`
;
DROP
TABLE
IF
EXISTS
`idp`
;
DROP
TABLE
IF
EXISTS
`idp`
;
DROP
TABLE
IF
EXISTS
`inbox`
;
DROP
TABLE
IF
EXISTS
`inbox`
;
DROP
TABLE
IF
EXISTS
`webhook`
;
-- migration_history
-- migration_history
CREATE
TABLE
`migration_history`
(
CREATE
TABLE
`migration_history`
(
...
@@ -133,3 +134,14 @@ CREATE TABLE `inbox` (
...
@@ -133,3 +134,14 @@ CREATE TABLE `inbox` (
`status`
TEXT
NOT
NULL
,
`status`
TEXT
NOT
NULL
,
`message`
TEXT
NOT
NULL
`message`
TEXT
NOT
NULL
);
);
-- webhook
CREATE
TABLE
`webhook`
(
`id`
INT
NOT
NULL
AUTO_INCREMENT
PRIMARY
KEY
,
`created_ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`updated_ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`row_status`
VARCHAR
(
256
)
NOT
NULL
DEFAULT
'NORMAL'
,
`creator_id`
INT
NOT
NULL
,
`name`
TEXT
NOT
NULL
,
`url`
TEXT
NOT
NULL
);
store/db/sqlite/migration/dev/LATEST__SCHEMA.sql
View file @
c50f4f4c
...
@@ -12,6 +12,7 @@ DROP TABLE IF EXISTS activity;
...
@@ -12,6 +12,7 @@ DROP TABLE IF EXISTS activity;
DROP
TABLE
IF
EXISTS
storage
;
DROP
TABLE
IF
EXISTS
storage
;
DROP
TABLE
IF
EXISTS
idp
;
DROP
TABLE
IF
EXISTS
idp
;
DROP
TABLE
IF
EXISTS
inbox
;
DROP
TABLE
IF
EXISTS
inbox
;
DROP
TABLE
IF
EXISTS
webhook
;
-- migration_history
-- migration_history
CREATE
TABLE
migration_history
(
CREATE
TABLE
migration_history
(
...
...
store/db/sqlite/migration/prod/LATEST__SCHEMA.sql
View file @
c50f4f4c
...
@@ -12,6 +12,7 @@ DROP TABLE IF EXISTS activity;
...
@@ -12,6 +12,7 @@ DROP TABLE IF EXISTS activity;
DROP
TABLE
IF
EXISTS
storage
;
DROP
TABLE
IF
EXISTS
storage
;
DROP
TABLE
IF
EXISTS
idp
;
DROP
TABLE
IF
EXISTS
idp
;
DROP
TABLE
IF
EXISTS
inbox
;
DROP
TABLE
IF
EXISTS
inbox
;
DROP
TABLE
IF
EXISTS
webhook
;
-- migration_history
-- migration_history
CREATE
TABLE
migration_history
(
CREATE
TABLE
migration_history
(
...
@@ -144,3 +145,16 @@ CREATE TABLE inbox (
...
@@ -144,3 +145,16 @@ CREATE TABLE inbox (
status
TEXT
NOT
NULL
,
status
TEXT
NOT
NULL
,
message
TEXT
NOT
NULL
DEFAULT
'{}'
message
TEXT
NOT
NULL
DEFAULT
'{}'
);
);
-- webhook
CREATE
TABLE
webhook
(
id
INTEGER
PRIMARY
KEY
AUTOINCREMENT
,
created_ts
BIGINT
NOT
NULL
DEFAULT
(
strftime
(
'%s'
,
'now'
)),
updated_ts
BIGINT
NOT
NULL
DEFAULT
(
strftime
(
'%s'
,
'now'
)),
row_status
TEXT
NOT
NULL
CHECK
(
row_status
IN
(
'NORMAL'
,
'ARCHIVED'
))
DEFAULT
'NORMAL'
,
creator_id
INTEGER
NOT
NULL
,
name
TEXT
NOT
NULL
,
url
TEXT
NOT
NULL
);
CREATE
INDEX
idx_webhook_creator_id
ON
webhook
(
creator_id
);
Write
Preview
Markdown
is supported
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