1CREATE TABLE status
2(
3 id integer PRIMARY KEY,
4 name TEXT NOT NULL,
5 next_status Integer references status
6);
7
8insert into status(id, name, next_status)
9values
10(1,'init', 2),
11(2,'waiting ror price approve', 3),
12(3,'sent', 4),
13(4,'accepted', 5),
14(5,'finished', null);
15