Skip to content

Commit 10b713d

Browse files
author
Thilo Hohlt
authored
Merge pull request #36 from archtika/devel
Replace diff-match-patch with js-diff and fix missing filesystem deletion
2 parents 36881bf + d34a623 commit 10b713d

20 files changed

+122
-287
lines changed

nix/package.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let
1010
web = buildNpmPackage {
1111
name = "web-app";
1212
src = ../web-app;
13-
npmDepsHash = "sha256-J58LwSEQa0p6J6h/wPhpGY/60n9a7TOV5WfNm4K1NH0=";
13+
npmDepsHash = "sha256-ab7MJ5vl6XNaAHTyzRxj/Zpk1nEKQLzGmPGJdDrdemg=";
1414
npmFlags = [ "--legacy-peer-deps" ];
1515
installPhase = ''
1616
mkdir -p $out/web-app

rest-api/db/migrations/20240719071602_main_tables.sql

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -157,41 +157,3 @@ CREATE TABLE internal.collab (
157157
);
158158

159159
-- migrate:down
160-
DROP TABLE internal.collab;
161-
162-
DROP TABLE internal.footer;
163-
164-
DROP TABLE internal.article;
165-
166-
DROP TABLE internal.docs_category;
167-
168-
DROP TABLE internal.home;
169-
170-
DROP TABLE internal.header;
171-
172-
DROP TABLE internal.settings;
173-
174-
DROP TABLE internal.media;
175-
176-
DROP TABLE internal.website;
177-
178-
DROP TABLE internal.user;
179-
180-
DROP SCHEMA api;
181-
182-
DROP FUNCTION internal.generate_slug;
183-
184-
DROP SCHEMA internal;
185-
186-
DROP ROLE anon;
187-
188-
DROP ROLE authenticated_user;
189-
190-
DROP ROLE administrator;
191-
192-
DROP ROLE authenticator;
193-
194-
ALTER DEFAULT PRIVILEGES GRANT EXECUTE ON FUNCTIONS TO PUBLIC;
195-
196-
DROP EXTENSION unaccent;
197-

rest-api/db/migrations/20240720073454_automatic_schema_cache_reloading.sql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,3 @@ CREATE EVENT TRIGGER pgrst_watch ON ddl_command_end
1313
EXECUTE FUNCTION internal.pgrst_watch ();
1414

1515
-- migrate:down
16-
DROP EVENT TRIGGER pgrst_watch;
17-
18-
DROP FUNCTION internal.pgrst_watch;
19-

rest-api/db/migrations/20240720074103_user_management_roles_jwt.sql

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -170,23 +170,3 @@ GRANT EXECUTE ON FUNCTION api.login TO anon;
170170
GRANT EXECUTE ON FUNCTION api.delete_account TO authenticated_user;
171171

172172
-- migrate:down
173-
DROP TRIGGER encrypt_pass ON internal.user;
174-
175-
DROP TRIGGER ensure_user_role_exists ON internal.user;
176-
177-
DROP FUNCTION api.register;
178-
179-
DROP FUNCTION api.login;
180-
181-
DROP FUNCTION api.delete_account;
182-
183-
DROP FUNCTION internal.user_role;
184-
185-
DROP FUNCTION internal.encrypt_pass;
186-
187-
DROP FUNCTION internal.check_role_exists;
188-
189-
DROP EXTENSION pgjwt;
190-
191-
DROP EXTENSION pgcrypto;
192-

rest-api/db/migrations/20240720132802_exposed_views_functions.sql

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -163,25 +163,3 @@ GRANT SELECT, INSERT (website_id, user_id, permission_level), UPDATE (permission
163163
GRANT SELECT, INSERT, UPDATE, DELETE ON api.collab TO authenticated_user;
164164

165165
-- migrate:down
166-
DROP FUNCTION api.create_website;
167-
168-
DROP VIEW api.collab;
169-
170-
DROP VIEW api.footer;
171-
172-
DROP VIEW api.home;
173-
174-
DROP VIEW api.docs_category;
175-
176-
DROP VIEW api.article;
177-
178-
DROP VIEW api.header;
179-
180-
DROP VIEW api.settings;
181-
182-
DROP VIEW api.website;
183-
184-
DROP VIEW api.user;
185-
186-
DROP VIEW api.account;
187-

rest-api/db/migrations/20240724191017_row_level_security.sql

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -170,77 +170,3 @@ CREATE POLICY delete_collaborations ON internal.collab
170170
USING (internal.user_has_website_access (website_id, 30, collaborator_permission_level => permission_level, collaborator_user_id => user_id));
171171

172172
-- migrate:down
173-
DROP POLICY view_user ON internal.user;
174-
175-
DROP POLICY update_user ON internal.user;
176-
177-
DROP POLICY delete_user ON internal.user;
178-
179-
DROP POLICY view_websites ON internal.website;
180-
181-
DROP POLICY delete_website ON internal.website;
182-
183-
DROP POLICY update_website ON internal.website;
184-
185-
DROP POLICY view_settings ON internal.settings;
186-
187-
DROP POLICY update_settings ON internal.settings;
188-
189-
DROP POLICY view_header ON internal.header;
190-
191-
DROP POLICY update_header ON internal.header;
192-
193-
DROP POLICY view_home ON internal.home;
194-
195-
DROP POLICY update_home ON internal.home;
196-
197-
DROP POLICY view_articles ON internal.article;
198-
199-
DROP POLICY update_article ON internal.article;
200-
201-
DROP POLICY delete_article ON internal.article;
202-
203-
DROP POLICY insert_article ON internal.article;
204-
205-
DROP POLICY view_categories ON internal.docs_category;
206-
207-
DROP POLICY update_category ON internal.docs_category;
208-
209-
DROP POLICY delete_category ON internal.docs_category;
210-
211-
DROP POLICY insert_category ON internal.docs_category;
212-
213-
DROP POLICY view_footer ON internal.footer;
214-
215-
DROP POLICY update_footer ON internal.footer;
216-
217-
DROP POLICY view_collaborations ON internal.collab;
218-
219-
DROP POLICY insert_collaborations ON internal.collab;
220-
221-
DROP POLICY update_collaborations ON internal.collab;
222-
223-
DROP POLICY delete_collaborations ON internal.collab;
224-
225-
DROP FUNCTION internal.user_has_website_access;
226-
227-
ALTER TABLE internal.user DISABLE ROW LEVEL SECURITY;
228-
229-
ALTER TABLE internal.website DISABLE ROW LEVEL SECURITY;
230-
231-
ALTER TABLE internal.media DISABLE ROW LEVEL SECURITY;
232-
233-
ALTER TABLE internal.settings DISABLE ROW LEVEL SECURITY;
234-
235-
ALTER TABLE internal.header DISABLE ROW LEVEL SECURITY;
236-
237-
ALTER TABLE internal.home DISABLE ROW LEVEL SECURITY;
238-
239-
ALTER TABLE internal.article DISABLE ROW LEVEL SECURITY;
240-
241-
ALTER TABLE internal.docs_category DISABLE ROW LEVEL SECURITY;
242-
243-
ALTER TABLE internal.footer DISABLE ROW LEVEL SECURITY;
244-
245-
ALTER TABLE internal.collab DISABLE ROW LEVEL SECURITY;
246-

rest-api/db/migrations/20240805132306_last_modified_triggers.sql

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,3 @@ CREATE TRIGGER update_collab_last_modified
7474
EXECUTE FUNCTION internal.update_last_modified ();
7575

7676
-- migrate:down
77-
DROP TRIGGER update_website_last_modified ON internal.website;
78-
79-
DROP TRIGGER update_settings_last_modified ON internal.settings;
80-
81-
DROP TRIGGER update_header_last_modified ON internal.header;
82-
83-
DROP TRIGGER update_home_last_modified ON internal.home;
84-
85-
DROP TRIGGER update_article_last_modified ON internal.article;
86-
87-
DROP TRIGGER update_docs_category_modified ON internal.docs_category;
88-
89-
DROP TRIGGER update_footer_last_modified ON internal.footer;
90-
91-
DROP TRIGGER update_collab_last_modified ON internal.collab;
92-
93-
DROP FUNCTION internal.update_last_modified;
94-

rest-api/db/migrations/20240808141708_collaborator_not_owner.sql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,3 @@ CREATE CONSTRAINT TRIGGER check_user_not_website_owner
2424
EXECUTE FUNCTION internal.check_user_not_website_owner ();
2525

2626
-- migrate:down
27-
DROP TRIGGER check_user_not_website_owner ON internal.collab;
28-
29-
DROP FUNCTION internal.check_user_not_website_owner;
30-

rest-api/db/migrations/20240810115846_image_upload_function.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,3 @@ GRANT EXECUTE ON FUNCTION api.retrieve_file TO anon;
9595
GRANT EXECUTE ON FUNCTION api.retrieve_file TO authenticated_user;
9696

9797
-- migrate:down
98-
DROP FUNCTION api.upload_file;
99-
100-
DROP FUNCTION api.retrieve_file;
101-
102-
DROP DOMAIN "*/*";
103-

rest-api/db/migrations/20240911070907_change_log.sql

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -133,29 +133,3 @@ CREATE TRIGGER track_changes_collab
133133
EXECUTE FUNCTION internal.track_changes ();
134134

135135
-- migrate:down
136-
DROP TRIGGER track_changes_website ON internal.website;
137-
138-
DROP TRIGGER track_changes_media ON internal.media;
139-
140-
DROP TRIGGER track_changes_settings ON internal.settings;
141-
142-
DROP TRIGGER track_changes_header ON internal.header;
143-
144-
DROP TRIGGER track_changes_home ON internal.home;
145-
146-
DROP TRIGGER track_changes_article ON internal.article;
147-
148-
DROP TRIGGER track_changes_docs_category ON internal.docs_category;
149-
150-
DROP TRIGGER track_changes_footer ON internal.footer;
151-
152-
DROP TRIGGER track_changes_collab ON internal.collab;
153-
154-
DROP FUNCTION internal.track_changes;
155-
156-
DROP VIEW api.change_log;
157-
158-
DROP TABLE internal.change_log;
159-
160-
DROP EXTENSION hstore;
161-

0 commit comments

Comments
 (0)