1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/QtClient/JoplinQtClient/schema.sql

81 lines
1.2 KiB
MySQL
Raw Normal View History

2016-12-18 23:44:45 +02:00
CREATE TABLE folders (
2016-12-22 23:35:35 +02:00
id TEXT PRIMARY KEY,
2016-12-18 23:44:45 +02:00
title TEXT,
created_time INT,
2017-01-05 20:01:50 +02:00
updated_time INT
2016-12-18 23:44:45 +02:00
);
CREATE TABLE notes (
2016-12-22 23:35:35 +02:00
id TEXT PRIMARY KEY,
2016-12-18 23:44:45 +02:00
title TEXT,
body TEXT,
parent_id INT,
created_time INT,
updated_time INT,
2016-12-20 12:22:50 +02:00
latitude NUMERIC,
longitude NUMERIC,
altitude NUMERIC,
source TEXT,
author TEXT,
source_url TEXT,
is_todo BOOLEAN,
todo_due INT,
todo_completed INT,
source_application TEXT,
application_data TEXT,
2017-01-05 20:01:50 +02:00
`order` INT
2016-12-20 12:22:50 +02:00
);
CREATE TABLE tags (
2016-12-22 23:35:35 +02:00
id TEXT PRIMARY KEY,
title TEXT,
created_time INT,
2017-01-05 20:01:50 +02:00
updated_time INT
2016-12-22 23:35:35 +02:00
);
CREATE TABLE note_tags (
id INTEGER PRIMARY KEY,
note_id TEXT,
2017-01-05 20:01:50 +02:00
tag_id TEXT
2016-12-20 12:22:50 +02:00
);
CREATE TABLE resources (
2016-12-22 23:35:35 +02:00
id TEXT PRIMARY KEY,
2016-12-20 12:22:50 +02:00
title TEXT,
mime TEXT,
filename TEXT,
created_time INT,
2017-01-05 20:01:50 +02:00
updated_time INT
2016-12-20 12:22:50 +02:00
);
CREATE TABLE note_resources (
2016-12-22 23:35:35 +02:00
id INTEGER PRIMARY KEY,
note_id TEXT,
2017-01-05 20:01:50 +02:00
resource_id TEXT
2016-12-18 23:44:45 +02:00
);
CREATE TABLE version (
version INT
);
2016-12-31 11:48:18 +02:00
CREATE TABLE changes (
id INTEGER PRIMARY KEY,
2017-01-02 16:04:27 +02:00
`type` INT,
2016-12-31 11:48:18 +02:00
item_id TEXT,
item_type INT,
2017-01-02 16:04:27 +02:00
item_field TEXT
2016-12-31 11:48:18 +02:00
);
2016-12-23 19:47:38 +02:00
--CREATE TABLE mimetypes (
-- id INT,
-- mime TEXT
--);
--CREATE TABLE mimetype_extensions (
-- id INTEGER PRIMARY KEY,
-- mimetype_id,
-- extension TEXT
--);
2016-12-20 12:22:50 +02:00
INSERT INTO version (version) VALUES (1);