2023-11-29 15:41:29 +00:00
|
|
|
create table article (
|
|
|
|
id serial primary key,
|
|
|
|
title text not null,
|
|
|
|
text text not null,
|
2023-12-01 11:11:19 +00:00
|
|
|
ap_id varchar(255) not null unique,
|
2023-11-29 15:41:29 +00:00
|
|
|
instance_id varchar(255) not null,
|
|
|
|
local bool not null
|
|
|
|
);
|
|
|
|
|
|
|
|
create table edit (
|
|
|
|
id serial primary key,
|
2023-12-01 11:11:19 +00:00
|
|
|
ap_id varchar(255) not null unique,
|
2023-11-29 15:41:29 +00:00
|
|
|
diff text not null,
|
|
|
|
article_id int REFERENCES article ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
|
|
|
|
version text not null,
|
2023-12-01 15:07:22 +00:00
|
|
|
previous_version text not null
|
2023-11-29 15:41:29 +00:00
|
|
|
)
|