forked from orbit-oss/flask
Merge pull request #655 from oliversong/master
SQLite doesn't recognize data type "string"
This commit is contained in:
commit
ab3d9d12c6
3 changed files with 8 additions and 8 deletions
|
|
@ -13,8 +13,8 @@ the just created `flaskr` folder:
|
||||||
drop table if exists entries;
|
drop table if exists entries;
|
||||||
create table entries (
|
create table entries (
|
||||||
id integer primary key autoincrement,
|
id integer primary key autoincrement,
|
||||||
title string not null,
|
title text not null,
|
||||||
text string not null
|
text text not null
|
||||||
);
|
);
|
||||||
|
|
||||||
This schema consists of a single table called `entries` and each row in
|
This schema consists of a single table called `entries` and each row in
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
drop table if exists entries;
|
drop table if exists entries;
|
||||||
create table entries (
|
create table entries (
|
||||||
id integer primary key autoincrement,
|
id integer primary key autoincrement,
|
||||||
title string not null,
|
title text not null,
|
||||||
text string not null
|
text text not null
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
drop table if exists user;
|
drop table if exists user;
|
||||||
create table user (
|
create table user (
|
||||||
user_id integer primary key autoincrement,
|
user_id integer primary key autoincrement,
|
||||||
username string not null,
|
username text not null,
|
||||||
email string not null,
|
email text not null,
|
||||||
pw_hash string not null
|
pw_hash text not null
|
||||||
);
|
);
|
||||||
|
|
||||||
drop table if exists follower;
|
drop table if exists follower;
|
||||||
|
|
@ -16,6 +16,6 @@ drop table if exists message;
|
||||||
create table message (
|
create table message (
|
||||||
message_id integer primary key autoincrement,
|
message_id integer primary key autoincrement,
|
||||||
author_id integer not null,
|
author_id integer not null,
|
||||||
text string not null,
|
text text not null,
|
||||||
pub_date integer
|
pub_date integer
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue