diff --git a/migration/19.12/1912.sql b/migration/19.12/1912.sql index a1aab46bd89f492e8fb7e119aa89f359ea85540e..70160614c07890450c795bb31d066108211f1e25 100644 --- a/migration/19.12/1912.sql +++ b/migration/19.12/1912.sql @@ -661,6 +661,17 @@ DO $$ BEGIN END$$; UPDATE baskets set basket_clause = replace(basket_clause, 'nature_id' , 'custom_fields->>''1'''); +/* users followed resources */ +DROP TABLE IF EXISTS users_followed_resources; +CREATE TABLE users_followed_resources +( + id serial NOT NULL, + res_id int NOT NULL, + user_id int NOT NULL, + CONSTRAINT users_followed_resources_pkey PRIMARY KEY (id) +) +WITH (OIDS=FALSE); + TRUNCATE TABLE indexing_models; INSERT INTO indexing_models (id, category, label, "default", owner, private) VALUES (1, 'incoming', 'Courrier arrivée', TRUE, 23, FALSE); INSERT INTO indexing_models (id, category, label, "default", owner, private) VALUES (2, 'outgoing', 'Courrier départ', FALSE, 23, FALSE); diff --git a/sql/structure.sql b/sql/structure.sql index 571ea509f8260ceac30a500063223974fcf712ea..6137cae0d11acafb737d7111f1e7005bf9a495de 100755 --- a/sql/structure.sql +++ b/sql/structure.sql @@ -1454,3 +1454,13 @@ CREATE TABLE contacts_custom_fields_list CONSTRAINT contacts_custom_fields_list_unique_key UNIQUE (label) ) WITH (OIDS=FALSE); + +/* users followed resources */ +CREATE TABLE users_followed_resources +( + id serial NOT NULL, + res_id int NOT NULL, + user_id int NOT NULL, + CONSTRAINT users_followed_resources_pkey PRIMARY KEY (id) +) +WITH (OIDS=FALSE);