zoukankan      html  css  js  c++  java
  • bistoury建库建表(一)

    bistoury

    DROP TABLE
    IF EXISTS bistoury_app;

    CREATE TABLE bistoury_app
    (
    id INT UNSIGNED auto_increment PRIMARY KEY,
    code VARCHAR(50) DEFAULT '' NOT NULL COMMENT '应用代号',
    name VARCHAR(50) DEFAULT '' NOT NULL COMMENT '应用名称',
    group_code VARCHAR(50) DEFAULT '' NOT NULL COMMENT '所属组编码',
    status TINYINT DEFAULT 0 NOT NULL COMMENT '应用状态, 0=未审核,1=审核通过, 2=审核被拒绝, 3=已废弃',
    creator VARCHAR(50) DEFAULT '' NOT NULL COMMENT '创建者',
    create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
    CONSTRAINT uniq_code UNIQUE (CODE)
    ) charset = utf8mb4;

    DROP TABLE
    IF EXISTS bistoury_user_app;

    CREATE TABLE bistoury_user_app
    (
    id INT UNSIGNED auto_increment PRIMARY KEY,
    app_code VARCHAR(50) NOT NULL COMMENT '应用代号',
    user_code VARCHAR(50) NOT NULL COMMENT '用户标识',
    create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
    CONSTRAINT uniq_app_user UNIQUE (
    app_code,
    user_code
    )
    ) charset = utf8mb4;

    CREATE INDEX idx_app_code ON bistoury_user_app (app_code);

    CREATE INDEX idx_user_code ON bistoury_user_app (user_code);

    DROP TABLE
    IF EXISTS bistoury_server;

    CREATE TABLE bistoury_server
    (
    id BIGINT(11) UNSIGNED auto_increment COMMENT '主键' PRIMARY KEY,
    server_id varchar(32) default '' not null comment 'server id',
    ip VARCHAR(15) DEFAULT '' NOT NULL COMMENT 'server ip',
    port INT UNSIGNED DEFAULT 0 NOT NULL COMMENT 'server port',
    host VARCHAR(100) DEFAULT '' NOT NULL COMMENT 'server host',
    log_dir VARCHAR(255) DEFAULT '' NOT NULL COMMENT 'server 日志目录',
    room VARCHAR(20) DEFAULT '' NOT NULL COMMENT 'server机房',
    app_code varchar(50) default '' not null comment '对应的appcode',
    auto_jstack_enable tinyint default 0 not null comment '自动jstack打开状态:0为关闭,1为开启',
    auto_jmap_histo_enable tinyint default 0 not null comment '打开自动jmap histo状态:0为关闭,1为开启',
    index idx_server_app_code (app_code),
    constraint uniq_server_id unique (server_id),
    CONSTRAINT uniq_ip UNIQUE (ip)
    ) charset = utf8mb4;

    DROP TABLE IF EXISTS `bistoury_gitlab_token`;
    CREATE TABLE `bistoury_gitlab_token`
    (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
    `user_code` varchar(50) NOT NULL DEFAULT '' COMMENT '用户code',
    `private_token` varchar(100) NOT NULL DEFAULT '' COMMENT 'gitlab private token',
    `create_time` timestamp NOT NULL DEFAULT '1970-01-01 08:00:01' COMMENT '创建时间',
    `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    PRIMARY KEY (`id`),
    UNIQUE KEY `uniq_git_user_code` (`user_code`)
    ) CHARSET = utf8mb4;

    DROP TABLE if exists `bistoury_user`;
    create table `bistoury_user`(
    id int unsigned auto_increment comment '主键' primary key ,
    user_code varchar(50) not null default '' comment '用户code',
    password varchar(100) not null default '' comment '用户密码',
    constraint uniq_user_code unique (user_code)
    )CHARSET = utf8mb4;

    insert into bistoury_user (user_code, password) values ('admin','q1mHvT20zskSnIHSF27d/A==');
    insert into bistoury_app(code, name, group_code, status, creator) values ('bistoury_demo_app','测试应用','tcdev',1,'admin');
    insert into bistoury_user_app (app_code, user_code) values ('bistoury_demo_app','admin');
    insert into bistoury_server (server_id, ip, port, host, log_dir, room, app_code, auto_jstack_enable, auto_jmap_histo_enable) values ('bade8ba7d59b4ca0b91a044739a670aa','${local_ip}',8080,'${local_host}','${log_dir}','al','bistoury_demo_app',1,0);

  • 相关阅读:
    条码的开发使用介绍文档
    identity server4
    IUrlHelper ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
    netcore 版本 切换 sdk
    深层目录文件复制,C# 递归,录音录像图片文件过多,用于测试程序
    C# int uint long ulong byte sbyte float double decimal 范围,及类型!
    sqlserver 数据类型 C# clr 数据类型 映射
    Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger' while attempting to activate 'xxxxx.Controllers.xxxxController'.
    identity 基础表没有创建 aspnetuserclaims aspnetuserlogins
    DatabaseGeneratedOption
  • 原文地址:https://www.cnblogs.com/longxok/p/11512626.html
Copyright © 2011-2022 走看看