Skip to content

Commit d7eece0

Browse files
[Fix-17979][DAO] Fix INT/BIGINT mismatch for t_ds_serial_command across DB schemas
1 parent 7123dae commit d7eece0

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ CREATE TABLE t_ds_command
348348
DROP TABLE IF EXISTS `t_ds_serial_command`;
349349
CREATE TABLE `t_ds_serial_command` (
350350
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
351-
`workflow_definition_code` int(11) NOT NULL COMMENT 'workflow definition code',
352-
`workflow_definition_version` int(11) NOT NULL COMMENT 'workflow definition code',
351+
`workflow_definition_code` bigint(20) NOT NULL COMMENT 'workflow definition code',
352+
`workflow_definition_version` int(11) NOT NULL COMMENT 'workflow definition version',
353353
`workflow_instance_id` bigint(20) NOT NULL COMMENT 'workflow instance id',
354354
`state` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'state of the serial queue: 0 waiting, 1 fired',
355355
`command` text COMMENT 'command json',

dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ CREATE TABLE `t_ds_command` (
356356
DROP TABLE IF EXISTS `t_ds_serial_command`;
357357
CREATE TABLE `t_ds_serial_command` (
358358
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
359-
`workflow_definition_code` int(11) NOT NULL COMMENT 'workflow definition code',
359+
`workflow_definition_code` bigint(20) NOT NULL COMMENT 'workflow definition code',
360360
`workflow_definition_version` int(11) NOT NULL COMMENT 'workflow definition version',
361361
`workflow_instance_id` bigint(20) NOT NULL COMMENT 'workflow instance id',
362362
`state` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'state of the serial queue: 0 waiting, 1 fired',

dolphinscheduler-dao/src/main/resources/sql/upgrade/3.4.1_schema/mysql/dolphinscheduler_ddl.sql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
-- Fix workflow_definition_code type mismatch (INT -> BIGINT)
18-
ALTER TABLE `t_ds_serial_command`
19-
MODIFY COLUMN `workflow_definition_code` BIGINT(20) NOT NULL;

dolphinscheduler-dao/src/main/resources/sql/upgrade/3.4.1_schema/postgresql/dolphinscheduler_ddl.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@
1818
CREATE SEQUENCE IF NOT EXISTS t_ds_task_instance_context_id_seq;
1919
ALTER TABLE t_ds_task_instance_context
2020
ALTER COLUMN id SET DEFAULT nextval('t_ds_task_instance_context_id_seq'::regclass);
21+
22+
-- Change column type to BIGINT
23+
ALTER TABLE t_ds_serial_command
24+
ALTER COLUMN workflow_definition_code TYPE BIGINT;
25+

0 commit comments

Comments
 (0)