more on readme
This commit is contained in:
parent
31f69856a6
commit
6ee4b463e0
1 changed files with 3 additions and 3 deletions
|
@ -28,14 +28,14 @@ Connect to the database as user *kosync* (with psql) and create the database tab
|
||||||
```sql
|
```sql
|
||||||
CREATE TABLE users (
|
CREATE TABLE users (
|
||||||
id BIGSERIAL PRIMARY KEY,
|
id BIGSERIAL PRIMARY KEY,
|
||||||
username TEXT NOT NULL,
|
username TEXT UNIQUE NOT NULL,
|
||||||
password TEXT
|
password TEXT
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE progresses (
|
CREATE TABLE progresses (
|
||||||
id BIGSERIAL PRIMARY KEY,
|
id BIGSERIAL PRIMARY KEY,
|
||||||
user_id BIGINT,
|
user_id BIGINT,
|
||||||
document TEXT UNIQUE NOT NULL,
|
document TEXT NOT NULL,
|
||||||
progress TEXT NOT NULL,
|
progress TEXT NOT NULL,
|
||||||
percentage REAL NOT NULL,
|
percentage REAL NOT NULL,
|
||||||
device TEXT NOT NULL,
|
device TEXT NOT NULL,
|
||||||
|
@ -45,4 +45,4 @@ CREATE TABLE progresses (
|
||||||
REFERENCES users(id) ON DELETE CASCADE,
|
REFERENCES users(id) ON DELETE CASCADE,
|
||||||
UNIQUE (user_id, document)
|
UNIQUE (user_id, document)
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue