porter_lightweight/user-service/src/main/resources/config/create_db_user.sql [18:46]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CREATE DATABASE IF NOT EXISTS porter_user_db;

USE porter_user_db;


CREATE TABLE `T_USER` (
  `ID`  INTEGER(8) NOT NULL AUTO_INCREMENT COMMENT 'user id',
  `USER_NAME`  VARCHAR(64) NOT NULL COMMENT 'user name',
  `PASSWORD`  VARCHAR(64) NOT NULL COMMENT 'user password',
  `ROLE_NAME`  VARCHAR(64) NOT NULL COMMENT 'user role',
  PRIMARY KEY (`ID`)
);

#### password is encrypted for test
insert into T_USER(USER_NAME, PASSWORD, ROLE_NAME) values("admin", "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=", "admin");
insert into T_USER(USER_NAME, PASSWORD, ROLE_NAME) values("guest", "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=", "guest");


CREATE TABLE `T_SESSION` (
  `ID`  INTEGER(8) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `SESSION_ID`  VARCHAR(64) NOT NULL COMMENT 'session id',
  `USER_NAME`  VARCHAR(64) NOT NULL COMMENT 'user name',
  `ROLE_NAME`  VARCHAR(64) NOT NULL COMMENT 'user role',
  `CREATION_TIME`  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'creation time',
  `ACTIVE_TIME`  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'last active time',
  PRIMARY KEY (`ID`)
);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



porter_springboot/user-service/src/main/resources/config/create_db_user.sql [18:46]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CREATE DATABASE IF NOT EXISTS porter_user_db;

USE porter_user_db;


CREATE TABLE `T_USER` (
  `ID`  INTEGER(8) NOT NULL AUTO_INCREMENT COMMENT 'user id',
  `USER_NAME`  VARCHAR(64) NOT NULL COMMENT 'user name',
  `PASSWORD`  VARCHAR(64) NOT NULL COMMENT 'user password',
  `ROLE_NAME`  VARCHAR(64) NOT NULL COMMENT 'user role',
  PRIMARY KEY (`ID`)
);

#### password is encrypted for test
insert into T_USER(USER_NAME, PASSWORD, ROLE_NAME) values("admin", "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=", "admin");
insert into T_USER(USER_NAME, PASSWORD, ROLE_NAME) values("guest", "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=", "guest");


CREATE TABLE `T_SESSION` (
  `ID`  INTEGER(8) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `SESSION_ID`  VARCHAR(64) NOT NULL COMMENT 'session id',
  `USER_NAME`  VARCHAR(64) NOT NULL COMMENT 'user name',
  `ROLE_NAME`  VARCHAR(64) NOT NULL COMMENT 'user role',
  `CREATION_TIME`  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'creation time',
  `ACTIVE_TIME`  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'last active time',
  PRIMARY KEY (`ID`)
);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



