|
@@ -0,0 +1,14 @@
|
|
1
|
+ALTER TABLE pod_nodes_history ADD COLUMN is_shared boolean NOT NULL DEFAULT False;
|
|
2
|
+ALTER TABLE pod_nodes_history ADD COLUMN is_public boolean NOT NULL DEFAULT False;
|
|
3
|
+ALTER TABLE pod_nodes_history ADD COLUMN public_url_key character varying(1024);
|
|
4
|
+
|
|
5
|
+-- create view
|
|
6
|
+CREATE OR REPLACE VIEW pod_nodes AS
|
|
7
|
+ SELECT DISTINCT ON (node_id) node_id, parent_id, node_order, node_type, created_at, updated_at,
|
|
8
|
+ data_label, data_content, data_datetime, node_status, data_reminder_datetime,
|
|
9
|
+ data_file_name, data_file_content, data_file_mime_type, parent_tree_path,
|
|
10
|
+ node_depth, owner_id, is_shared, is_public, public_url_key
|
|
11
|
+ FROM pod_nodes_history
|
|
12
|
+ ORDER BY node_id, updated_at DESC;
|
|
13
|
+
|
|
14
|
+
|