mirror of
https://github.com/shouptech/flask-tutorial.git
synced 2026-02-03 07:29:42 +00:00
Don't drop existing tables
This commit is contained in:
parent
405a1ef6c9
commit
60e25809fe
1 changed files with 2 additions and 5 deletions
|
|
@ -1,13 +1,10 @@
|
|||
DROP TABLE IF EXISTS user;
|
||||
DROP TABLE IF EXISTS post;
|
||||
|
||||
CREATE TABLE user (
|
||||
CREATE TABLE IF NOT EXISTS user (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
username TEXT UNIQUE NOT NULL,
|
||||
password TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE post (
|
||||
CREATE TABLE IF NOT EXISTS post (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
author_id INTEGER NOT NULL,
|
||||
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue