/table-structure-generator

A generator to show the structure of the PGSQL table in HTML

Primary LanguageRust

Table-Structure-Generator

Usage

table-structure-generator 1.0
Fun4wut
Generate PGSQL table structure

USAGE:
    table-structure-generator [OPTIONS] --password <PASSWORD> [TABLES]...

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -d, --database <DATABASE>    Sets database [default: postgres]
    -H, --host <HOST>            Sets the host [default: 127.0.0.1]
    -P, --password <PASSWORD>    Sets the password
    -p, --port <PORT>            Sets the port [default: 5432]
    -U, --username <USERNAME>    Sets PG username [default: postgres]

ARGS:
    <TABLES>...    the tables you want to generate the structure, default is all tables

This will print the html to stdin .

Tips:You can use > to redirect the output to a certain file

Example Preview

location

字段名称数据类型是否可空默认值
location_idintegerNONull
location_namecharacter varyingYESNull
dept_idintegerYESNull

user_info

字段名称数据类型是否可空默认值
user_idintegerNONull
permissionUSER-DEFINEDYESNull
scoreintegerYESNull
user_namecharacter varyingYESNull
user_passwordcharacter varyingYESNull
dept_idintegerYESNull
avatarbyteaYESNull

score_history

字段名称数据类型是否可空默认值
history_idintegerNONull
now_scoreintegerYESNull
prev_scoreintegerYESNull
user_idintegerYESNull
history_timetimestamp without time zoneYESNull

take

字段名称数据类型是否可空默认值
take_idintegerNONull
take_statusUSER-DEFINEDYESNull
course_idintegerYESNull
take_timetimestamp without time zoneYESNull
team_numintegerYESNull

friendship

字段名称数据类型是否可空默认值
user_to_idintegerNONull
user_from_idintegerNONull

department

字段名称数据类型是否可空默认值
dept_idintegerNONull
dept_namecharacter varyingYESNull

take_user_info

字段名称数据类型是否可空默认值
take_idintegerNONull
user_idintegerNONull

course

字段名称数据类型是否可空默认值
course_idintegerNONull
capacityintegerYESNull
course_namecharacter varyingYESNull
end_timetimestamp without time zoneYESNull
numintegerYESNull
start_timetimestamp without time zoneYESNull
visiblebooleanYESNull
dept_idintegerYESNull
location_idintegerYESNull