Skip to content

Commit 5e6d1db

Browse files
committed
Use BIGINT for mysql schema
1 parent bf91341 commit 5e6d1db

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

backend/mysql/schema.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
CREATE TABLE IF NOT EXISTS `instances` (
2-
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
2+
`id` BIGBIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
33
`instance_id` NVARCHAR(128) NOT NULL,
44
`execution_id` NVARCHAR(128) NOT NULL,
55
`parent_instance_id` NVARCHAR(128) NULL,
6-
`parent_schedule_event_id` INT NULL,
6+
`parent_schedule_event_id` BIGBIGINT NULL,
77
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
88
`completed_at` DATETIME NULL,
99
`locked_until` DATETIME NULL,
@@ -17,12 +17,12 @@ CREATE TABLE IF NOT EXISTS `instances` (
1717

1818

1919
CREATE TABLE IF NOT EXISTS `pending_events` (
20-
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
20+
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
2121
`event_id` NVARCHAR(128) NOT NULL,
2222
`instance_id` NVARCHAR(128) NOT NULL,
2323
`event_type` INT NOT NULL,
2424
`timestamp` DATETIME NOT NULL,
25-
`schedule_event_id` INT NOT NULL,
25+
`schedule_event_id` BIGINT NOT NULL,
2626
`attributes` BLOB NOT NULL,
2727
`visible_at` DATETIME NULL,
2828

@@ -32,12 +32,12 @@ CREATE TABLE IF NOT EXISTS `pending_events` (
3232

3333

3434
CREATE TABLE IF NOT EXISTS `history` (
35-
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
35+
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
3636
`event_id` NVARCHAR(64) NOT NULL,
3737
`instance_id` NVARCHAR(128) NOT NULL,
3838
`event_type` INT NOT NULL,
3939
`timestamp` DATETIME NOT NULL,
40-
`schedule_event_id` INT NOT NULL,
40+
`schedule_event_id` BIGINT NOT NULL,
4141
`attributes` BLOB NOT NULL,
4242
`visible_at` DATETIME NULL, -- Is this required?
4343

@@ -46,13 +46,13 @@ CREATE TABLE IF NOT EXISTS `history` (
4646

4747

4848
CREATE TABLE IF NOT EXISTS `activities` (
49-
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
49+
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
5050
`activity_id` NVARCHAR(64) NOT NULL,
5151
`instance_id` NVARCHAR(128) NOT NULL,
5252
`execution_id` NVARCHAR(128) NOT NULL,
5353
`event_type` INT NOT NULL,
5454
`timestamp` DATETIME NOT NULL,
55-
`schedule_event_id` INT NOT NULL,
55+
`schedule_event_id` BIGINT NOT NULL,
5656
`attributes` BLOB NOT NULL,
5757
`visible_at` DATETIME NULL,
5858
`locked_until` DATETIME NULL,

0 commit comments

Comments
 (0)