Przeglądaj źródła

更新 'init.sql'

master
王子玥 3 lat temu
rodzic
commit
05aed570b2
1 zmienionych plików z 40 dodań i 38 usunięć
  1. +40
    -37
      init.sql

+ 40
- 37
init.sql Wyświetl plik

@ -1,38 +1,40 @@
## 代码结构
-- im2latex_master OCR模型
--phpjs文件
Dockerfile
## 部署运行方式:
docker部署
1. ucloud云主机
2. 使ngnixphppython环境
```shell
docker build -t wangziyue/php-ngnix-python .
docker run -d --rm -v /var/app2/:/app/ -p 80:80 --privileged=true --name php-nginx-python wangziyue/php-ngnix-python:v2
```
3. ucloud的云数据库pdo.php中数据库地址
4. init.sql
5. 访 id:/index.php
## SaaS应用效果截图:
GRANT ALL ON blog.* TO 'root'@'%' IDENTIFIED BY 'a15862340183';
CREATE DATABASE blog DEFAULT CHARACTER SET utf8;
CREATE TABLE users (
user_id INT UNSIGNED NOT NULL AUTO_INCREMENT ,
password VARCHAR(128) NOT NULL ,
name VARCHAR(255) NOT NULL ,
PRIMARY KEY(user_id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE article (
article_id INT UNSIGNED NOT NULL AUTO_INCREMENT ,
user_id INT UNSIGNED NOT NULL,
headline TEXT,
content TEXT,
viewer INT UNSIGNED ,
public varchar(11),
category varchar(128),
PRIMARY KEY(article_id),
CONSTRAINT articc_ibfk_1
FOREIGN KEY (user_id)
REFERENCES users (user_id)
ON DELETE CASCADE ON UPDATE CASCADE
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE commentsss (
id INT UNSIGNED NOT NULL AUTO_INCREMENT ,
comment_id INT UNSIGNED NOT NULL,
feedback_id INT UNSIGNED ,
name VARCHAR(128),
user_id INTEGER,
article_id INT UNSIGNED,
content TEXT,
PRIMARY KEY(id),
CONSTRAINT articcc_ibfk_1
FOREIGN KEY (article_id)
REFERENCES article (article_id)
ON DELETE CASCADE ON UPDATE CASCADE
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

Ładowanie…
Anuluj
Zapisz