sige 1 year ago
parent
commit
724905364d
  1. 4
      pom.xml
  2. 12
      src/main/resources/application.yml
  3. 145
      src/main/resources/db/migration/V1_0__int.sql

4
pom.xml

@ -42,6 +42,10 @@
<artifactId>freemarker</artifactId>
<version>2.3.31</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
</dependencies>
<build>

12
src/main/resources/application.yml

@ -1,6 +1,16 @@
server :
port : 80
spring:
datasource:
url: jdbc:sqlite:D:/Sige5193/uf/app.db
username: 1
password: 1
driver-class-name: org.sqlite.JDBC
driver-class-name: org.sqlite.JDBC
flyway:
enabled: true
encoding: UTF-8
locations: classpath:db/migration
validate-on-migrate: true
validateMigrationNaming: true

145
src/main/resources/db/migration/V1_0__int.sql

@ -0,0 +1,145 @@
-- ----------------------------
-- Table structure for app_actuator_cmds
-- ----------------------------
DROP TABLE IF EXISTS "app_actuator_cmds";
CREATE TABLE "app_actuator_cmds" (
"id" text NOT NULL,
"actuatorId" text NOT NULL,
"connectionKey" TEXT NOT NULL DEFAULT '',
"name" TEXT NOT NULL,
"cmdId" TEXT NOT NULL,
"cmdKey" TEXT NOT NULL,
"cmdFlags" TEXT NOT NULL DEFAULT '',
"parameters" TEXT NOT NULL,
"fixedParameters" TEXT NOT NULL,
"waitForFinish" integer NOT NULL DEFAULT 0,
PRIMARY KEY ("id")
);
-- ----------------------------
-- Table structure for app_actuators
-- ----------------------------
DROP TABLE IF EXISTS "app_actuators";
CREATE TABLE "app_actuators" (
"id" text NOT NULL,
"moduleId" text NOT NULL,
"key" TEXT NOT NULL,
"name" TEXT NOT NULL,
"properties" TEXT NOT NULL DEFAULT "{}",
PRIMARY KEY ("id")
);
-- ----------------------------
-- Table structure for app_dict_items
-- ----------------------------
DROP TABLE IF EXISTS "app_dict_items";
CREATE TABLE "app_dict_items" (
"id" text NOT NULL,
"groupKey" TEXT NOT NULL,
"groupName" TEXT NOT NULL,
"itemKey" TEXT NOT NULL,
"itemName" TEXT NOT NULL,
"itemValue" TEXT NOT NULL
);
-- ----------------------------
-- Table structure for app_modules
-- ----------------------------
DROP TABLE IF EXISTS "app_modules";
CREATE TABLE "app_modules" (
"id" text NOT NULL,
"key" TEXT NOT NULL,
"name" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- ----------------------------
-- Table structure for app_notifications
-- ----------------------------
DROP TABLE IF EXISTS "app_notifications";
CREATE TABLE "app_notifications" (
"id" text NOT NULL,
"type" TEXT,
"data" TEXT,
"status" TEXT,
PRIMARY KEY ("id")
);
-- ----------------------------
-- Table structure for app_operation_logs
-- ----------------------------
DROP TABLE IF EXISTS "app_operation_logs";
CREATE TABLE "app_operation_logs" (
"id" text NOT NULL,
"userId" text NOT NULL,
"content" text NOT NULL,
"time" integer,
PRIMARY KEY ("id")
);
-- ----------------------------
-- Table structure for app_options
-- ----------------------------
DROP TABLE IF EXISTS "app_options";
CREATE TABLE "app_options" (
"id" text NOT NULL,
"key" TEXT,
"value" TEXT,
"comment" TEXT,
"editable" TEXT,
"dataType" TEXT,
"unit" TEXT
);
-- ----------------------------
-- Table structure for app_runtime_log
-- ----------------------------
DROP TABLE IF EXISTS "app_runtime_log";
CREATE TABLE "app_runtime_log" (
"id" text NOT NULL,
"type" text NOT NULL,
"content" text NOT NULL,
"timestamp" integer NOT NULL,
"time" text NOT NULL,
PRIMARY KEY ("id")
);
-- ----------------------------
-- Table structure for app_runtime_variables
-- ----------------------------
DROP TABLE IF EXISTS "app_runtime_variables";
CREATE TABLE "app_runtime_variables" (
"id" text NOT NULL,
"key" TEXT,
"value" TEXT,
PRIMARY KEY ("id")
);
-- ----------------------------
-- Table structure for app_snippets
-- ----------------------------
DROP TABLE IF EXISTS "app_snippets";
CREATE TABLE "app_snippets" (
"id" text NOT NULL,
"key" TEXT NOT NULL DEFAULT '',
"name" TEXT NOT NULL,
"cmds" TEXT NOT NULL,
PRIMARY KEY ("id")
);
-- ----------------------------
-- Table structure for app_users
-- ----------------------------
DROP TABLE IF EXISTS "app_users";
CREATE TABLE "app_users" (
"id" text NOT NULL,
"account" TEXT NOT NULL,
"password" TEXT NOT NULL,
"salt" TEXT DEFAULT '',
"createdAt" integer DEFAULT 0,
"createdBy" text DEFAULT 0,
"accessToken" TEXT,
"accessTokenExpiredAt" integer,
"isAdmin" integer DEFAULT 0,
PRIMARY KEY ("id")
);
Loading…
Cancel
Save