Skip to content

Commit

Permalink
[type:bugfix] fix namespace user rel h2 sql (apache#5760)
Browse files Browse the repository at this point in the history
* [type:bugfix] fix namespace user rel h2 sql

* [type:bugfix] fix namespace user rel h2 sql

* Update schema.sql

---------

Co-authored-by: moremind <[email protected]>
  • Loading branch information
Aias00 and moremind authored Nov 7, 2024
1 parent c8a4310 commit b19af23
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions shenyu-admin/src/main/resources/sql-script/h2/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1412,12 +1412,14 @@ CREATE TABLE IF NOT EXISTS `scale_history`
);


CREATE TABLE `namespace_user_rel` (
`id` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'primary key',
`namespace_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'namespace_id',
`user_id` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'user_id',
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'date_created',
`date_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'date_updated'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='namespace user relation ';

INSERT INTO `namespace_user_rel` (`id`, `namespace_id`, `user_id`) VALUES ('1852580590991884288', '649330b6-c2d7-4edc-be8e-8a54df9eb385', '1');
CREATE TABLE IF NOT EXISTS `namespace_user_rel`
(
`id` varchar(128) NOT NULL COMMENT 'primary key',
`namespace_id` varchar(50) NOT NULL COMMENT 'namespace_id',
`user_id` varchar(128) NOT NULL COMMENT 'user_id',
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'date_created',
`date_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'date_updated'
PRIMARY KEY (`id`)
);

INSERT INTO `namespace_user_rel` (`id`, `namespace_id`, `user_id`) VALUES ('1852580590991884288', '649330b6-c2d7-4edc-be8e-8a54df9eb385', '1');

0 comments on commit b19af23

Please sign in to comment.