• postgresql搭建


    搭建postgresql-11.3,和客户端工具

    1,准备对应的包,右键直接下一步安装完即可, 将postgresql设置为本地服务,方便启动,

    2,用对应客户端软件连接,新建一个数据库controlDB 新建用户lzkj 密码lzkj123 设为controlDB的所有者 再新建目前总控上面用到的两张表

    
    ```sql
    1、Controller_Users: //用户表
    CREATE UNLOGGED TABLE public."Controller_Users"
    (
      "UserID" bigint NOT NULL,
      "UserName" character varying(128) NOT NULL,
      "PassWord" character varying(128) NOT NULL,
      "Nullity" character varying(1) NOT NULL,
      "MobilePhone" character varying(11) NOT NULL,
      "CreateTime" timestamp(6) with time zone,
      CONSTRAINT "Controller_Users_pkey" PRIMARY KEY ("UserID")
    )
    WITH (
      OIDS=FALSE
    );
    ALTER TABLE public."Controller_Users"
      OWNER TO test;
    COMMENT ON TABLE public."Controller_Users"
      IS '总表';
    
    第二张表
    2、Owner//1表
    CREATE UNLOGGED TABLE public."Owner"
    (
      "ID" bigint NOT NULL,
      "OwnerID" character varying(64) NOT NULL,
      "OwnerName" character varying(64) NOT NULL,
      "ServerIP" character varying(32) NOT NULL,
      "ServerPost" character varying(4) NOT NULL DEFAULT 80,
      "Telephone" character varying(11) NOT NULL,
      "CreationTime" character varying(64),
      CONSTRAINT "Owner_pkey" PRIMARY KEY ("ID")
    )
    WITH (
      OIDS=FALSE
    );
    ALTER TABLE public."Owner"
      OWNER TO test;
    COMMENT ON TABLE public."Owner"
      IS '1表';
    ######
    新建两个序列:
    CREATE SEQUENCE public.controller_userid_seq
      INCREMENT 1
      MINVALUE 1
      MAXVALUE 999999
      START 4
      CACHE 1;
    ALTER TABLE public.controller_userid_seq
      OWNER TO test;
    第二个
    CREATE SEQUENCE public.owner_id_seq
      INCREMENT 1
      MINVALUE 1
      MAXVALUE 999999
      START 1
      CACHE 1;
    ALTER TABLE public.owner_id_seq
      OWNER TO test
    

    告诉web端对应的ip端口用户密码

  • 相关阅读:
    R语言实战应用案例:论文篇(二)-特殊盒须图绘制
    html2canvas图片跨域问题
    CSS 两栏布局
    TuckER 论文笔记
    AI变现之Gpts搞流量+赚钱
    ardupilot 中常用的框架类及结构
    ceph-deploy命令应用
    LeetCode 46 全排列 - Java 实现
    python xlrd+xlwt+xlutils处理excel
    mysql启动报错The server quit without updating PID file几种解决办法
  • 原文地址:https://blog.csdn.net/Rio520/article/details/140108147