From cd3f8a41af6e5ee01a05bedf96b6ec2b690939f5 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 14 Mar 2021 20:37:35 +0100 Subject: [PATCH] removed (112) migrations originating before first public release (0.20 in Sept 2018) --- db/migrations/0001__cleanup_tables.sql | 11 - ...002__cleanup_unused_columns_from_notes.sql | 3 - .../0003__add_is_deleted_to_note.sql | 1 - .../0004__add_date_modified_to_notes_tree.sql | 1 - db/migrations/0005__cleanup_options.sql | 1 - ..._date_modified_from_to_in_note_history.sql | 3 - ...0007__readd_encryption_to_note_history.sql | 1 - db/migrations/0008__fix_note_history.sql | 15 -- db/migrations/0009__indexes.sql | 41 ---- .../0010__add_is_deleted_to_notes_tree.sql | 5 - .../0011__add_last_synced_option.sql | 1 - .../0012__create_index_on_notes_history.sql | 5 - .../0013__last_sync_pulled_pushed.sql | 3 - db/migrations/0014__change_audit_log_id.sql | 16 -- db/migrations/0015__trim_note_ids.sql | 6 - db/migrations/0016__trim_note_ids2.sql | 6 - db/migrations/0017__document_id.sql | 1 - db/migrations/0018__document_secret.sql | 1 - .../0019__date_modified_for_options.sql | 1 - db/migrations/0020__sync.sql | 15 -- db/migrations/0021__sync_add_source_id.sql | 1 - db/migrations/0022__add_note_history_id.sql | 7 - .../0023__remove_id_from_note_history.sql | 27 --- .../0024__remove_id_from_options.sql | 11 - db/migrations/0025__create_event_log.sql | 10 - db/migrations/0026__recent_notes_table.sql | 4 - .../0027__is_deleted_in_recent_notes.sql | 1 - .../0028__rename_encryption_to_protected.sql | 52 ----- ...n_timeout_to_protected_session_timeout.sql | 1 - db/migrations/0030__hello_world.js | 1 - .../0031__change_encryption_to_CBC.js | 44 ---- ...__add_option_for_encrypted_data_key_iv.sql | 1 - ...0033__change_data_key_encryption_to_cbc.js | 25 --- db/migrations/0034__source_ids.sql | 5 - ...035__root_notes_will_have_note_id_root.sql | 1 - db/migrations/0036__clear_sync_table.sql | 1 - db/migrations/0037__add_note_tree_id.sql | 21 -- db/migrations/0038__rename_start_node.sql | 1 - ...ent_notes_should_point_to_note_tree_id.sql | 7 - db/migrations/0040__fix_note_pid.sql | 6 - .../0041__recent_notes_with_note_path.sql | 7 - .../0042__remove_unique_index_on_note_id.sql | 24 -- db/migrations/0043__clear_sync_table.sql | 3 - db/migrations/0044__drop_audit_log.sql | 1 - .../0045__add_prefix_to_notes_tree.sql | 1 - db/migrations/0046__drop_links_and_images.sql | 2 - db/migrations/0047__test.sql | 1 - ...0048__add_note_tree_id_to_recent_notes.sql | 10 - ...rename_start_note_tree_id_to_note_path.sql | 1 - db/migrations/0050__string_dates.sql | 156 ------------- .../0051__note_id_index_on_notes_tree.sql | 5 - db/migrations/0052__fill_sync_table.sql | 8 - .../0053__cleanup_inconsistencies.sql | 18 -- .../0054__more_cleanup_inconsistencies.sql | 3 - db/migrations/0055__set_last_synced_push.sql | 1 - db/migrations/0056__fill_sync_again.sql | 13 -- db/migrations/0057__add_foreign_keys.sql | 101 --------- ...58__remove_foreign_key_from_notes_tree.sql | 29 --- .../0059__remove_foreign_key_again.sql | 28 --- .../0060__remove_rest_of_foreign_keys.sql | 34 --- .../0061__change_index_to_unique.sql | 6 - .../0062__change_index_back_to_non_unique.sql | 9 - db/migrations/0063__image_table.sql | 11 - .../0064__add_note_id_to_image_table.sql | 16 -- db/migrations/0065__notes_image.sql | 27 --- .../0066__create_attributes_table.sql | 12 - .../0067__add_is_synced_to_options.sql | 5 - db/migrations/0068__add_note_type.sql | 1 - db/migrations/0069__add_mime_to_note.sql | 1 - .../0070__rename_columns_to_camel_case.sql | 207 ------------------ db/migrations/0071__fix_sync_entity_names.sql | 4 - ...72__allow_multiple_attributes_per_note.sql | 1 - .../0073__add_isDeleted_to_attributes.sql | 1 - .../0074__add_position_to_attribute.sql | 1 - db/migrations/0075__add_api_token.sql | 7 - .../0076__add_attribute_name_index.sql | 1 - .../0077__non_null_attribute_value.sql | 23 -- db/migrations/0078__javascript_type.sql | 1 - db/migrations/0079__rename_note_tree.sql | 38 ---- .../0080__rename_attributes_to_labels.sql | 22 -- ..._rename_history_snapshot_time_interval.sql | 1 - db/migrations/0082__camelCase_options.sql | 14 -- db/migrations/0083__camelCase_labels.sql | 7 - db/migrations/0084__camelCase_reddit_ids.sql | 4 - db/migrations/0085__camelCase_run_values.sql | 2 - .../0086__camelCase_custom_labels.sql | 7 - .../0087__add_type_mime_to_note_revision.sql | 5 - .../0088__non_null_note_title_content.sql | 34 --- db/migrations/0089__add_root_branch.sql | 5 - db/migrations/0090__branch_index.sql | 1 - db/migrations/0091__drop_isDeleted_index.sql | 2 - db/migrations/0092__add_type_index.sql | 2 - db/migrations/0093__add_hash_field.sql | 9 - db/migrations/0094__unify_auditing_fields.sql | 30 --- db/migrations/0095__mime_type_for_render.sql | 1 - db/migrations/0096__unify_surrogate_keys.sql | 29 --- db/migrations/0097__add_zoomFactor.sql | 2 - .../0098__rename_hideInAutocomplete.sql | 1 - db/migrations/0099__add_theme_option.sql | 2 - db/migrations/0100__remove_optionId.sql | 15 -- db/migrations/0101__add_sync_options.sql | 8 - db/migrations/0102__fix_sync_entityIds.sql | 2 - .../0103__add_initialized_option.sql | 2 - .../0104__fill_sync_rows_for_options.js | 4 - ...delete_content_from_soft_deleted_notes.sql | 2 - db/migrations/0106__add_relations_table.sql | 15 -- ...add_inheritable_attribute_to_relations.sql | 1 - db/migrations/0108__new_backup_options.sql | 9 - db/migrations/0109__create_attributes.sql | 27 --- .../0110__add_isInheritable_to_attributes.sql | 1 - .../0111__cleanup_labels_and_relations.sql | 4 - .../0112__rename_inheritAttributes.sql | 1 - package-lock.json | 54 ++--- package.json | 10 +- 114 files changed, 32 insertions(+), 1485 deletions(-) delete mode 100644 db/migrations/0001__cleanup_tables.sql delete mode 100644 db/migrations/0002__cleanup_unused_columns_from_notes.sql delete mode 100644 db/migrations/0003__add_is_deleted_to_note.sql delete mode 100644 db/migrations/0004__add_date_modified_to_notes_tree.sql delete mode 100644 db/migrations/0005__cleanup_options.sql delete mode 100644 db/migrations/0006__date_modified_from_to_in_note_history.sql delete mode 100644 db/migrations/0007__readd_encryption_to_note_history.sql delete mode 100644 db/migrations/0008__fix_note_history.sql delete mode 100644 db/migrations/0009__indexes.sql delete mode 100644 db/migrations/0010__add_is_deleted_to_notes_tree.sql delete mode 100644 db/migrations/0011__add_last_synced_option.sql delete mode 100644 db/migrations/0012__create_index_on_notes_history.sql delete mode 100644 db/migrations/0013__last_sync_pulled_pushed.sql delete mode 100644 db/migrations/0014__change_audit_log_id.sql delete mode 100644 db/migrations/0015__trim_note_ids.sql delete mode 100644 db/migrations/0016__trim_note_ids2.sql delete mode 100644 db/migrations/0017__document_id.sql delete mode 100644 db/migrations/0018__document_secret.sql delete mode 100644 db/migrations/0019__date_modified_for_options.sql delete mode 100644 db/migrations/0020__sync.sql delete mode 100644 db/migrations/0021__sync_add_source_id.sql delete mode 100644 db/migrations/0022__add_note_history_id.sql delete mode 100644 db/migrations/0023__remove_id_from_note_history.sql delete mode 100644 db/migrations/0024__remove_id_from_options.sql delete mode 100644 db/migrations/0025__create_event_log.sql delete mode 100644 db/migrations/0026__recent_notes_table.sql delete mode 100644 db/migrations/0027__is_deleted_in_recent_notes.sql delete mode 100644 db/migrations/0028__rename_encryption_to_protected.sql delete mode 100644 db/migrations/0029__rename_encryption_session_timeout_to_protected_session_timeout.sql delete mode 100644 db/migrations/0030__hello_world.js delete mode 100644 db/migrations/0031__change_encryption_to_CBC.js delete mode 100644 db/migrations/0032__add_option_for_encrypted_data_key_iv.sql delete mode 100644 db/migrations/0033__change_data_key_encryption_to_cbc.js delete mode 100644 db/migrations/0034__source_ids.sql delete mode 100644 db/migrations/0035__root_notes_will_have_note_id_root.sql delete mode 100644 db/migrations/0036__clear_sync_table.sql delete mode 100644 db/migrations/0037__add_note_tree_id.sql delete mode 100644 db/migrations/0038__rename_start_node.sql delete mode 100644 db/migrations/0039__recent_notes_should_point_to_note_tree_id.sql delete mode 100644 db/migrations/0040__fix_note_pid.sql delete mode 100644 db/migrations/0041__recent_notes_with_note_path.sql delete mode 100644 db/migrations/0042__remove_unique_index_on_note_id.sql delete mode 100644 db/migrations/0043__clear_sync_table.sql delete mode 100644 db/migrations/0044__drop_audit_log.sql delete mode 100644 db/migrations/0045__add_prefix_to_notes_tree.sql delete mode 100644 db/migrations/0046__drop_links_and_images.sql delete mode 100644 db/migrations/0047__test.sql delete mode 100644 db/migrations/0048__add_note_tree_id_to_recent_notes.sql delete mode 100644 db/migrations/0049__rename_start_note_tree_id_to_note_path.sql delete mode 100644 db/migrations/0050__string_dates.sql delete mode 100644 db/migrations/0051__note_id_index_on_notes_tree.sql delete mode 100644 db/migrations/0052__fill_sync_table.sql delete mode 100644 db/migrations/0053__cleanup_inconsistencies.sql delete mode 100644 db/migrations/0054__more_cleanup_inconsistencies.sql delete mode 100644 db/migrations/0055__set_last_synced_push.sql delete mode 100644 db/migrations/0056__fill_sync_again.sql delete mode 100644 db/migrations/0057__add_foreign_keys.sql delete mode 100644 db/migrations/0058__remove_foreign_key_from_notes_tree.sql delete mode 100644 db/migrations/0059__remove_foreign_key_again.sql delete mode 100644 db/migrations/0060__remove_rest_of_foreign_keys.sql delete mode 100644 db/migrations/0061__change_index_to_unique.sql delete mode 100644 db/migrations/0062__change_index_back_to_non_unique.sql delete mode 100644 db/migrations/0063__image_table.sql delete mode 100644 db/migrations/0064__add_note_id_to_image_table.sql delete mode 100644 db/migrations/0065__notes_image.sql delete mode 100644 db/migrations/0066__create_attributes_table.sql delete mode 100644 db/migrations/0067__add_is_synced_to_options.sql delete mode 100644 db/migrations/0068__add_note_type.sql delete mode 100644 db/migrations/0069__add_mime_to_note.sql delete mode 100644 db/migrations/0070__rename_columns_to_camel_case.sql delete mode 100644 db/migrations/0071__fix_sync_entity_names.sql delete mode 100644 db/migrations/0072__allow_multiple_attributes_per_note.sql delete mode 100644 db/migrations/0073__add_isDeleted_to_attributes.sql delete mode 100644 db/migrations/0074__add_position_to_attribute.sql delete mode 100644 db/migrations/0075__add_api_token.sql delete mode 100644 db/migrations/0076__add_attribute_name_index.sql delete mode 100644 db/migrations/0077__non_null_attribute_value.sql delete mode 100644 db/migrations/0078__javascript_type.sql delete mode 100644 db/migrations/0079__rename_note_tree.sql delete mode 100644 db/migrations/0080__rename_attributes_to_labels.sql delete mode 100644 db/migrations/0081__rename_history_snapshot_time_interval.sql delete mode 100644 db/migrations/0082__camelCase_options.sql delete mode 100644 db/migrations/0083__camelCase_labels.sql delete mode 100644 db/migrations/0084__camelCase_reddit_ids.sql delete mode 100644 db/migrations/0085__camelCase_run_values.sql delete mode 100644 db/migrations/0086__camelCase_custom_labels.sql delete mode 100644 db/migrations/0087__add_type_mime_to_note_revision.sql delete mode 100644 db/migrations/0088__non_null_note_title_content.sql delete mode 100644 db/migrations/0089__add_root_branch.sql delete mode 100644 db/migrations/0090__branch_index.sql delete mode 100644 db/migrations/0091__drop_isDeleted_index.sql delete mode 100644 db/migrations/0092__add_type_index.sql delete mode 100644 db/migrations/0093__add_hash_field.sql delete mode 100644 db/migrations/0094__unify_auditing_fields.sql delete mode 100644 db/migrations/0095__mime_type_for_render.sql delete mode 100644 db/migrations/0096__unify_surrogate_keys.sql delete mode 100644 db/migrations/0097__add_zoomFactor.sql delete mode 100644 db/migrations/0098__rename_hideInAutocomplete.sql delete mode 100644 db/migrations/0099__add_theme_option.sql delete mode 100644 db/migrations/0100__remove_optionId.sql delete mode 100644 db/migrations/0101__add_sync_options.sql delete mode 100644 db/migrations/0102__fix_sync_entityIds.sql delete mode 100644 db/migrations/0103__add_initialized_option.sql delete mode 100644 db/migrations/0104__fill_sync_rows_for_options.js delete mode 100644 db/migrations/0105__delete_content_from_soft_deleted_notes.sql delete mode 100644 db/migrations/0106__add_relations_table.sql delete mode 100644 db/migrations/0107__add_inheritable_attribute_to_relations.sql delete mode 100644 db/migrations/0108__new_backup_options.sql delete mode 100644 db/migrations/0109__create_attributes.sql delete mode 100644 db/migrations/0110__add_isInheritable_to_attributes.sql delete mode 100644 db/migrations/0111__cleanup_labels_and_relations.sql delete mode 100644 db/migrations/0112__rename_inheritAttributes.sql diff --git a/db/migrations/0001__cleanup_tables.sql b/db/migrations/0001__cleanup_tables.sql deleted file mode 100644 index 89b7355c5..000000000 --- a/db/migrations/0001__cleanup_tables.sql +++ /dev/null @@ -1,11 +0,0 @@ -DROP TABLE IF EXISTS anchors; -DROP TABLE IF EXISTS attachments; -DROP TABLE IF EXISTS bookmarks; -DROP TABLE IF EXISTS custom_properties; -DROP TABLE IF EXISTS deletions; -DROP TABLE IF EXISTS deletions_attachments; -DROP TABLE IF EXISTS formatting; -DROP TABLE IF EXISTS icons; -DROP TABLE IF EXISTS tags; -DROP TABLE IF EXISTS tags_notes; -DROP TABLE IF EXISTS tasks; \ No newline at end of file diff --git a/db/migrations/0002__cleanup_unused_columns_from_notes.sql b/db/migrations/0002__cleanup_unused_columns_from_notes.sql deleted file mode 100644 index 8f98a5d6a..000000000 --- a/db/migrations/0002__cleanup_unused_columns_from_notes.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE notes_mig AS SELECT note_id, note_title, note_text, note_clone_id, date_created, date_modified, encryption FROM notes; -DROP TABLE notes; -ALTER TABLE notes_mig RENAME TO notes; \ No newline at end of file diff --git a/db/migrations/0003__add_is_deleted_to_note.sql b/db/migrations/0003__add_is_deleted_to_note.sql deleted file mode 100644 index 8ba0afa7d..000000000 --- a/db/migrations/0003__add_is_deleted_to_note.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE notes ADD COLUMN is_deleted INTEGER NOT NULL DEFAULT 0 \ No newline at end of file diff --git a/db/migrations/0004__add_date_modified_to_notes_tree.sql b/db/migrations/0004__add_date_modified_to_notes_tree.sql deleted file mode 100644 index c914bd1c7..000000000 --- a/db/migrations/0004__add_date_modified_to_notes_tree.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE notes_tree ADD COLUMN date_modified INTEGER NOT NULL DEFAULT 0 \ No newline at end of file diff --git a/db/migrations/0005__cleanup_options.sql b/db/migrations/0005__cleanup_options.sql deleted file mode 100644 index 1832f28e9..000000000 --- a/db/migrations/0005__cleanup_options.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM options WHERE opt_name IN ('is_readonly', 'prop_modified', 'doc_title', 'doc_UID', 'format_version', 'flask_secret_key') \ No newline at end of file diff --git a/db/migrations/0006__date_modified_from_to_in_note_history.sql b/db/migrations/0006__date_modified_from_to_in_note_history.sql deleted file mode 100644 index 6bcbd4f2e..000000000 --- a/db/migrations/0006__date_modified_from_to_in_note_history.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE notes_history_mig AS SELECT id, note_id, note_title, note_text, date_modified AS date_modified_from, date_modified AS date_modified_to FROM notes_history; -DROP TABLE notes_history; -ALTER TABLE notes_history_mig RENAME TO notes_history; \ No newline at end of file diff --git a/db/migrations/0007__readd_encryption_to_note_history.sql b/db/migrations/0007__readd_encryption_to_note_history.sql deleted file mode 100644 index b5ecfb3cb..000000000 --- a/db/migrations/0007__readd_encryption_to_note_history.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE notes_history ADD COLUMN encryption INTEGER DEFAULT 0 \ No newline at end of file diff --git a/db/migrations/0008__fix_note_history.sql b/db/migrations/0008__fix_note_history.sql deleted file mode 100644 index fa71edf37..000000000 --- a/db/migrations/0008__fix_note_history.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE `notes_history_mig` ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, - `note_id` INT, - `note_title` TEXT, - `note_text` TEXT, - `date_modified_from` INT, - `date_modified_to` INT, - `encryption` INTEGER DEFAULT 0 -); - -INSERT INTO notes_history (id, note_id, note_title, note_text, date_modified_from, date_modified_to, encryption) - SELECT id, note_id, note_title, note_text, date_modified_from, date_modified_to, encryption FROM notes_history; - -DROP TABLE notes_history; -ALTER TABLE notes_history_mig RENAME TO notes_history; \ No newline at end of file diff --git a/db/migrations/0009__indexes.sql b/db/migrations/0009__indexes.sql deleted file mode 100644 index b427a9337..000000000 --- a/db/migrations/0009__indexes.sql +++ /dev/null @@ -1,41 +0,0 @@ -CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` ( - `note_id` -); - -CREATE INDEX `IDX_images_note_id` ON `images` ( - `note_id` -); - -CREATE INDEX `IDX_links_note_id` ON `links` ( - `note_id` -); - -CREATE INDEX `IDX_audit_log_note_id` ON `audit_log` ( - `note_id` -); - -CREATE INDEX `IDX_audit_log_date_modified` ON `audit_log` ( - `date_modified` -); - -CREATE TABLE `notes_mig` ( - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `note_clone_id` TEXT, - `date_created` INT, - `date_modified` INT, - `encryption` INT, - `is_deleted` INTEGER NOT NULL DEFAULT 0, - PRIMARY KEY(`note_id`) -); - -INSERT INTO notes_mig (note_id, note_title, note_text, note_clone_id, date_created, date_modified, encryption) - SELECT note_id, note_title, note_text, note_clone_id, date_created, date_modified, encryption FROM notes; - -DROP TABLE notes; -ALTER TABLE notes_mig RENAME TO notes; - -CREATE INDEX `IDX_notes_is_deleted` ON `notes` ( - `is_deleted` -); \ No newline at end of file diff --git a/db/migrations/0010__add_is_deleted_to_notes_tree.sql b/db/migrations/0010__add_is_deleted_to_notes_tree.sql deleted file mode 100644 index 53d7040ee..000000000 --- a/db/migrations/0010__add_is_deleted_to_notes_tree.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE notes_tree ADD COLUMN is_deleted INTEGER NOT NULL DEFAULT 0; - -CREATE INDEX `IDX_notes_tree_is_deleted` ON `notes_tree` ( - `is_deleted` -); \ No newline at end of file diff --git a/db/migrations/0011__add_last_synced_option.sql b/db/migrations/0011__add_last_synced_option.sql deleted file mode 100644 index 7bdf47028..000000000 --- a/db/migrations/0011__add_last_synced_option.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO options (opt_name, opt_value) VALUES ('last_synced', 0) \ No newline at end of file diff --git a/db/migrations/0012__create_index_on_notes_history.sql b/db/migrations/0012__create_index_on_notes_history.sql deleted file mode 100644 index 235884a79..000000000 --- a/db/migrations/0012__create_index_on_notes_history.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE UNIQUE INDEX `IDX_notes_history_note_from_to` ON `notes_history` ( - `note_id`, - `date_modified_from`, - `date_modified_to` -); \ No newline at end of file diff --git a/db/migrations/0013__last_sync_pulled_pushed.sql b/db/migrations/0013__last_sync_pulled_pushed.sql deleted file mode 100644 index 060e076df..000000000 --- a/db/migrations/0013__last_sync_pulled_pushed.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE options SET opt_name = 'last_synced_pull' WHERE opt_name = 'last_synced'; - -INSERT INTO options (opt_name, opt_value) VALUES ('last_synced_push', 0); \ No newline at end of file diff --git a/db/migrations/0014__change_audit_log_id.sql b/db/migrations/0014__change_audit_log_id.sql deleted file mode 100644 index c553ecfd0..000000000 --- a/db/migrations/0014__change_audit_log_id.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `audit_log_mig` ( - `id` TEXT NOT NULL PRIMARY KEY, - `date_modified` INTEGER NOT NULL, - `category` TEXT NOT NULL, - `browser_id` TEXT, - `note_id` TEXT, - `change_from` TEXT, - `change_to` TEXT, - `comment` TEXT -); - -INSERT INTO audit_log_mig (id, date_modified, category, browser_id, note_id, change_from, change_to) - SELECT id, date_modified, category, browser_id, note_id, change_from, change_to FROM audit_log; - -DROP TABLE audit_log; -ALTER TABLE audit_log_mig RENAME TO audit_log; \ No newline at end of file diff --git a/db/migrations/0015__trim_note_ids.sql b/db/migrations/0015__trim_note_ids.sql deleted file mode 100644 index 3b981d172..000000000 --- a/db/migrations/0015__trim_note_ids.sql +++ /dev/null @@ -1,6 +0,0 @@ -UPDATE notes SET note_id = substr(note_id, 0, 22); -UPDATE notes_tree SET note_id = substr(note_id, 0, 22), note_pid = substr(note_pid, 0, 22); -UPDATE notes_history SET note_id = substr(note_id, 0, 22); -UPDATE audit_log SET note_id = substr(note_id, 0, 22); -UPDATE links SET note_id = substr(note_id, 0, 22); -UPDATE images SET note_id = substr(note_id, 0, 22); \ No newline at end of file diff --git a/db/migrations/0016__trim_note_ids2.sql b/db/migrations/0016__trim_note_ids2.sql deleted file mode 100644 index ad2772fa0..000000000 --- a/db/migrations/0016__trim_note_ids2.sql +++ /dev/null @@ -1,6 +0,0 @@ -UPDATE notes SET note_id = substr(note_id, 0, 13); -UPDATE notes_tree SET note_id = substr(note_id, 0, 13), note_pid = substr(note_pid, 0, 13); -UPDATE notes_history SET note_id = substr(note_id, 0, 13); -UPDATE audit_log SET note_id = substr(note_id, 0, 13); -UPDATE links SET note_id = substr(note_id, 0, 13); -UPDATE images SET note_id = substr(note_id, 0, 13); \ No newline at end of file diff --git a/db/migrations/0017__document_id.sql b/db/migrations/0017__document_id.sql deleted file mode 100644 index 9bced5a9b..000000000 --- a/db/migrations/0017__document_id.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO options (opt_name, opt_value) VALUES ('document_id', ''); \ No newline at end of file diff --git a/db/migrations/0018__document_secret.sql b/db/migrations/0018__document_secret.sql deleted file mode 100644 index 67c59df4e..000000000 --- a/db/migrations/0018__document_secret.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO options (opt_name, opt_value) VALUES ('document_secret', ''); \ No newline at end of file diff --git a/db/migrations/0019__date_modified_for_options.sql b/db/migrations/0019__date_modified_for_options.sql deleted file mode 100644 index 47684ba97..000000000 --- a/db/migrations/0019__date_modified_for_options.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE options ADD COLUMN date_modified INTEGER NOT NULL DEFAULT 0 \ No newline at end of file diff --git a/db/migrations/0020__sync.sql b/db/migrations/0020__sync.sql deleted file mode 100644 index e5d76f0cc..000000000 --- a/db/migrations/0020__sync.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE `sync` ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - `entity_name` TEXT NOT NULL, - `entity_id` TEXT NOT NULL, - `sync_date` INTEGER NOT NULL -); - -CREATE UNIQUE INDEX `IDX_sync_entity_name_id` ON `sync` ( - `entity_name`, - `entity_id` -); - -CREATE INDEX `IDX_sync_sync_date` ON `sync` ( - `sync_date` -); \ No newline at end of file diff --git a/db/migrations/0021__sync_add_source_id.sql b/db/migrations/0021__sync_add_source_id.sql deleted file mode 100644 index 59315fbf4..000000000 --- a/db/migrations/0021__sync_add_source_id.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE sync ADD COLUMN source_id TEXT \ No newline at end of file diff --git a/db/migrations/0022__add_note_history_id.sql b/db/migrations/0022__add_note_history_id.sql deleted file mode 100644 index f47295552..000000000 --- a/db/migrations/0022__add_note_history_id.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE notes_history ADD COLUMN note_history_id TEXT; - -UPDATE notes_history SET note_history_id = id; - -CREATE UNIQUE INDEX `IDX_note_history_note_history_id` ON `notes_history` ( - `note_history_id` -); \ No newline at end of file diff --git a/db/migrations/0023__remove_id_from_note_history.sql b/db/migrations/0023__remove_id_from_note_history.sql deleted file mode 100644 index 01902b57c..000000000 --- a/db/migrations/0023__remove_id_from_note_history.sql +++ /dev/null @@ -1,27 +0,0 @@ -CREATE TABLE `notes_history_mig` ( - `note_history_id` TEXT NOT NULL PRIMARY KEY, - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `encryption` INT, - `date_modified_from` INT, - `date_modified_to` INT -); - -INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, encryption, date_modified_from, date_modified_to) - SELECT note_history_id, note_id, note_title, note_text, encryption, date_modified_from, date_modified_to FROM notes_history; - -DROP TABLE notes_history; -ALTER TABLE notes_history_mig RENAME TO notes_history; - -CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` ( - `note_id` -); - -CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` ( - `date_modified_from` -); - -CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` ( - `date_modified_to` -); \ No newline at end of file diff --git a/db/migrations/0024__remove_id_from_options.sql b/db/migrations/0024__remove_id_from_options.sql deleted file mode 100644 index 68dfc9785..000000000 --- a/db/migrations/0024__remove_id_from_options.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE `options_mig` ( - `opt_name` TEXT NOT NULL PRIMARY KEY, - `opt_value` TEXT, - `date_modified` INT -); - -INSERT INTO options_mig (opt_name, opt_value, date_modified) - SELECT opt_name, opt_value, date_modified FROM options; - -DROP TABLE options; -ALTER TABLE options_mig RENAME TO options; diff --git a/db/migrations/0025__create_event_log.sql b/db/migrations/0025__create_event_log.sql deleted file mode 100644 index ea22282b4..000000000 --- a/db/migrations/0025__create_event_log.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE `event_log` ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - `note_id` TEXT, - `comment` TEXT, - `date_added` INTEGER NOT NULL -); - -CREATE INDEX `IDX_event_log_date_added` ON `event_log` ( - `date_added` -); \ No newline at end of file diff --git a/db/migrations/0026__recent_notes_table.sql b/db/migrations/0026__recent_notes_table.sql deleted file mode 100644 index e7a621e0a..000000000 --- a/db/migrations/0026__recent_notes_table.sql +++ /dev/null @@ -1,4 +0,0 @@ -CREATE TABLE `recent_notes` ( - `note_id` TEXT NOT NULL PRIMARY KEY, - `date_accessed` INTEGER NOT NULL -); \ No newline at end of file diff --git a/db/migrations/0027__is_deleted_in_recent_notes.sql b/db/migrations/0027__is_deleted_in_recent_notes.sql deleted file mode 100644 index ddf4d293c..000000000 --- a/db/migrations/0027__is_deleted_in_recent_notes.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE recent_notes ADD COLUMN is_deleted INT; \ No newline at end of file diff --git a/db/migrations/0028__rename_encryption_to_protected.sql b/db/migrations/0028__rename_encryption_to_protected.sql deleted file mode 100644 index 76859827a..000000000 --- a/db/migrations/0028__rename_encryption_to_protected.sql +++ /dev/null @@ -1,52 +0,0 @@ -UPDATE audit_log SET category = 'PROTECTED' WHERE category = 'ENCRYPTION'; - -DELETE FROM notes WHERE note_clone_id IS NOT NULL AND note_clone_id != ''; - -CREATE TABLE `notes_mig` ( - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `date_created` INT, - `date_modified` INT, - `is_protected` INT NOT NULL DEFAULT 0, - `is_deleted` INT NOT NULL DEFAULT 0, - PRIMARY KEY(`note_id`) -); - -INSERT INTO notes_mig (note_id, note_title, note_text, date_created, date_modified, is_protected, is_deleted) - SELECT note_id, note_title, note_text, date_created, date_modified, encryption, is_deleted FROM notes; - -DROP TABLE notes; -ALTER TABLE notes_mig RENAME TO notes; - -CREATE INDEX `IDX_notes_is_deleted` ON `notes` ( - `is_deleted` -); - -CREATE TABLE `notes_history_mig` ( - `note_history_id` TEXT NOT NULL PRIMARY KEY, - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `is_protected` INT, - `date_modified_from` INT, - `date_modified_to` INT -); - -INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to) - SELECT note_history_id, note_id, note_title, note_text, encryption, date_modified_from, date_modified_to FROM notes_history; - -DROP TABLE notes_history; -ALTER TABLE notes_history_mig RENAME TO notes_history; - -CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` ( - `note_id` -); - -CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` ( - `date_modified_from` -); - -CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` ( - `date_modified_to` -); \ No newline at end of file diff --git a/db/migrations/0029__rename_encryption_session_timeout_to_protected_session_timeout.sql b/db/migrations/0029__rename_encryption_session_timeout_to_protected_session_timeout.sql deleted file mode 100644 index 88fe48497..000000000 --- a/db/migrations/0029__rename_encryption_session_timeout_to_protected_session_timeout.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE options SET opt_name = 'protected_session_timeout' WHERE opt_name = 'encryption_session_timeout'; \ No newline at end of file diff --git a/db/migrations/0030__hello_world.js b/db/migrations/0030__hello_world.js deleted file mode 100644 index 15695bf87..000000000 --- a/db/migrations/0030__hello_world.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = async () => console.log("heeeelllooo!!!"); \ No newline at end of file diff --git a/db/migrations/0031__change_encryption_to_CBC.js b/db/migrations/0031__change_encryption_to_CBC.js deleted file mode 100644 index 346d45afc..000000000 --- a/db/migrations/0031__change_encryption_to_CBC.js +++ /dev/null @@ -1,44 +0,0 @@ -const sql = require('../services/sql'); -const data_encryption = require('../services/data_encryption'); -const password_encryption = require('../services/password_encryption'); -const readline = require('readline'); - -const cl = readline.createInterface(process.stdin, process.stdout); - -function question(q) { - return new Promise( (res, rej) => { - cl.question( q, answer => { - res(answer); - }) - }); -} - -module.exports = async () => { - const password = await question("Enter password: "); - const dataKey = await password_encryption.getDecryptedDataKey(password); - - const protectedNotes = await sql.getRows("SELECT * FROM notes WHERE is_protected = 1"); - - for (const note of protectedNotes) { - const decryptedTitle = data_encryption.decrypt(dataKey, note.note_title); - - note.note_title = data_encryption.encrypt(dataKey, "0" + note.note_id, decryptedTitle); - - const decryptedText = data_encryption.decrypt(dataKey, note.note_text); - note.note_text = data_encryption.encrypt(dataKey, "1" + note.note_id, decryptedText); - - await sql.execute("UPDATE notes SET note_title = ?, note_text = ? WHERE note_id = ?", [note.note_title, note.note_text, note.note_id]); - } - - const protectedNotesHistory = await sql.getRows("SELECT * FROM notes_history WHERE is_protected = 1"); - - for (const noteHistory of protectedNotesHistory) { - const decryptedTitle = data_encryption.decrypt(dataKey, noteHistory.note_title); - noteHistory.note_title = data_encryption.encrypt(dataKey, "0" + noteHistory.note_history_id, decryptedTitle); - - const decryptedText = data_encryption.decrypt(dataKey, noteHistory.note_text); - noteHistory.note_text = data_encryption.encrypt(dataKey, "1" + noteHistory.note_history_id, decryptedText); - - await sql.execute("UPDATE notes SET note_title = ?, note_text = ? WHERE note_id = ?", [noteHistory.note_title, noteHistory.note_text, noteHistory.note_history_id]); - } -}; \ No newline at end of file diff --git a/db/migrations/0032__add_option_for_encrypted_data_key_iv.sql b/db/migrations/0032__add_option_for_encrypted_data_key_iv.sql deleted file mode 100644 index e77d395da..000000000 --- a/db/migrations/0032__add_option_for_encrypted_data_key_iv.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO options (opt_name, opt_value) VALUES ('encrypted_data_key_iv', '') \ No newline at end of file diff --git a/db/migrations/0033__change_data_key_encryption_to_cbc.js b/db/migrations/0033__change_data_key_encryption_to_cbc.js deleted file mode 100644 index a0117a22a..000000000 --- a/db/migrations/0033__change_data_key_encryption_to_cbc.js +++ /dev/null @@ -1,25 +0,0 @@ -const password_encryption = require('../services/password_encryption'); -const readline = require('readline'); - -const cl = readline.createInterface(process.stdin, process.stdout); - -function question(q) { - return new Promise( (res, rej) => { - cl.question( q, answer => { - res(answer); - }) - }); -} - -module.exports = async () => { - const password = await question("Enter password: "); - let dataKey = await password_encryption.getDecryptedDataKey(password); - - console.log("Original data key: ", dataKey); - - dataKey = dataKey.slice(0, 16); - - console.log("Trimmed data key: ", dataKey); - - await password_encryption.setDataKey(password, dataKey); -}; \ No newline at end of file diff --git a/db/migrations/0034__source_ids.sql b/db/migrations/0034__source_ids.sql deleted file mode 100644 index c48513564..000000000 --- a/db/migrations/0034__source_ids.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE `source_ids` ( - `source_id` TEXT NOT NULL, - `date_created` INTEGER NOT NULL, - PRIMARY KEY(`source_id`) -); \ No newline at end of file diff --git a/db/migrations/0035__root_notes_will_have_note_id_root.sql b/db/migrations/0035__root_notes_will_have_note_id_root.sql deleted file mode 100644 index a6d7bedcd..000000000 --- a/db/migrations/0035__root_notes_will_have_note_id_root.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE notes_tree SET note_pid = 'root' WHERE note_pid = '' \ No newline at end of file diff --git a/db/migrations/0036__clear_sync_table.sql b/db/migrations/0036__clear_sync_table.sql deleted file mode 100644 index b6849242e..000000000 --- a/db/migrations/0036__clear_sync_table.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM sync; \ No newline at end of file diff --git a/db/migrations/0037__add_note_tree_id.sql b/db/migrations/0037__add_note_tree_id.sql deleted file mode 100644 index 5afc168e5..000000000 --- a/db/migrations/0037__add_note_tree_id.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TABLE [notes_tree_mig] ( - [note_tree_id] VARCHAR(30) PRIMARY KEY NOT NULL, - [note_id] VARCHAR(30) UNIQUE NOT NULL, - [note_pid] VARCHAR(30) NOT NULL, - [note_pos] INTEGER NOT NULL, - [is_expanded] BOOLEAN NULL , - date_modified INTEGER NOT NULL DEFAULT 0, - is_deleted INTEGER NOT NULL DEFAULT 0 -); - -INSERT INTO notes_tree_mig (note_tree_id, note_id, note_pid, note_pos, is_expanded, date_modified, is_deleted) - SELECT 'TT' || SUBSTR(note_id, 3), note_id, note_pid, note_pos, is_expanded, date_modified, is_deleted FROM notes_tree; - -UPDATE notes_tree_mig SET note_pid = 'TT' || SUBSTR(note_pid, 3) WHERE note_pid != 'root'; - -DROP TABLE notes_tree; -ALTER TABLE notes_tree_mig RENAME TO notes_tree; - -CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` ( - `note_tree_id` -); \ No newline at end of file diff --git a/db/migrations/0038__rename_start_node.sql b/db/migrations/0038__rename_start_node.sql deleted file mode 100644 index 9601974c8..000000000 --- a/db/migrations/0038__rename_start_node.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE options SET opt_name = 'start_note_tree_id' WHERE opt_name = 'start_node'; \ No newline at end of file diff --git a/db/migrations/0039__recent_notes_should_point_to_note_tree_id.sql b/db/migrations/0039__recent_notes_should_point_to_note_tree_id.sql deleted file mode 100644 index 00b5efbd3..000000000 --- a/db/migrations/0039__recent_notes_should_point_to_note_tree_id.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE recent_notes; - -CREATE TABLE `recent_notes` ( - `note_tree_id` TEXT NOT NULL PRIMARY KEY, - `date_accessed` INTEGER NOT NULL , - is_deleted INT -); \ No newline at end of file diff --git a/db/migrations/0040__fix_note_pid.sql b/db/migrations/0040__fix_note_pid.sql deleted file mode 100644 index f829e6902..000000000 --- a/db/migrations/0040__fix_note_pid.sql +++ /dev/null @@ -1,6 +0,0 @@ -UPDATE - notes_tree -SET - note_pid = (SELECT parent.note_id FROM notes_tree parent WHERE notes_tree.note_pid = parent.note_tree_id) -WHERE - note_pid != 'root' \ No newline at end of file diff --git a/db/migrations/0041__recent_notes_with_note_path.sql b/db/migrations/0041__recent_notes_with_note_path.sql deleted file mode 100644 index c83caa699..000000000 --- a/db/migrations/0041__recent_notes_with_note_path.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE recent_notes; - -CREATE TABLE `recent_notes` ( - `note_path` TEXT NOT NULL PRIMARY KEY, - `date_accessed` INTEGER NOT NULL , - is_deleted INT -); \ No newline at end of file diff --git a/db/migrations/0042__remove_unique_index_on_note_id.sql b/db/migrations/0042__remove_unique_index_on_note_id.sql deleted file mode 100644 index f014a16e6..000000000 --- a/db/migrations/0042__remove_unique_index_on_note_id.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE TABLE "notes_tree_mig" ( - [note_tree_id] VARCHAR(30) PRIMARY KEY NOT NULL, - [note_id] VARCHAR(30) NOT NULL, - [note_pid] VARCHAR(30) NOT NULL, - [note_pos] INTEGER NOT NULL, - [is_expanded] BOOLEAN NULL , - date_modified INTEGER NOT NULL DEFAULT 0, - is_deleted INTEGER NOT NULL DEFAULT 0 -); - -INSERT INTO notes_tree_mig (note_tree_id, note_id, note_pid, note_pos, is_expanded, date_modified, is_deleted) - SELECT note_tree_id, note_id, note_pid, note_pos, is_expanded, date_modified, is_deleted FROM notes_tree; - -DROP TABLE notes_tree; -ALTER TABLE notes_tree_mig RENAME TO notes_tree; - -CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` ( - `note_tree_id` -); - -CREATE INDEX `IDX_notes_tree_note_id_note_pid` ON `notes_tree` ( - `note_id`, - `note_pid` -); \ No newline at end of file diff --git a/db/migrations/0043__clear_sync_table.sql b/db/migrations/0043__clear_sync_table.sql deleted file mode 100644 index 147560955..000000000 --- a/db/migrations/0043__clear_sync_table.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM sync; - -UPDATE options SET opt_value = 0 WHERE opt_name IN ('last_synced_push', 'last_synced_pull'); \ No newline at end of file diff --git a/db/migrations/0044__drop_audit_log.sql b/db/migrations/0044__drop_audit_log.sql deleted file mode 100644 index cf4d99346..000000000 --- a/db/migrations/0044__drop_audit_log.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE audit_log; \ No newline at end of file diff --git a/db/migrations/0045__add_prefix_to_notes_tree.sql b/db/migrations/0045__add_prefix_to_notes_tree.sql deleted file mode 100644 index 3f18763c6..000000000 --- a/db/migrations/0045__add_prefix_to_notes_tree.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE notes_tree ADD COLUMN `prefix` TEXT \ No newline at end of file diff --git a/db/migrations/0046__drop_links_and_images.sql b/db/migrations/0046__drop_links_and_images.sql deleted file mode 100644 index 6536908d1..000000000 --- a/db/migrations/0046__drop_links_and_images.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP TABLE IF EXISTS links; -DROP TABLE IF EXISTS images; \ No newline at end of file diff --git a/db/migrations/0047__test.sql b/db/migrations/0047__test.sql deleted file mode 100644 index 027b7d63f..000000000 --- a/db/migrations/0047__test.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT 1; \ No newline at end of file diff --git a/db/migrations/0048__add_note_tree_id_to_recent_notes.sql b/db/migrations/0048__add_note_tree_id_to_recent_notes.sql deleted file mode 100644 index 3fbc03066..000000000 --- a/db/migrations/0048__add_note_tree_id_to_recent_notes.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE recent_notes; - -CREATE TABLE `recent_notes` ( - 'note_tree_id'TEXT NOT NULL PRIMARY KEY, - `note_path` TEXT NOT NULL, - `date_accessed` INTEGER NOT NULL , - is_deleted INT -); - -DELETE FROM sync WHERE entity_name = 'recent_notes'; \ No newline at end of file diff --git a/db/migrations/0049__rename_start_note_tree_id_to_note_path.sql b/db/migrations/0049__rename_start_note_tree_id_to_note_path.sql deleted file mode 100644 index 0ba12b4e9..000000000 --- a/db/migrations/0049__rename_start_note_tree_id_to_note_path.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE options SET opt_name = 'start_note_path' WHERE opt_name = 'start_note_tree_id'; \ No newline at end of file diff --git a/db/migrations/0050__string_dates.sql b/db/migrations/0050__string_dates.sql deleted file mode 100644 index 499c6c306..000000000 --- a/db/migrations/0050__string_dates.sql +++ /dev/null @@ -1,156 +0,0 @@ -DROP TABLE migrations; - --- Sync -CREATE TABLE `sync_mig` ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - `entity_name` TEXT NOT NULL, - `entity_id` TEXT NOT NULL, - `source_id` TEXT NOT NULL, - `sync_date` TEXT NOT NULL); - -INSERT INTO sync_mig (id, entity_name, entity_id, source_id, sync_date) - SELECT id, entity_name, entity_id, source_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', sync_date, 'unixepoch') FROM sync; - -DROP TABLE sync; -ALTER TABLE sync_mig RENAME TO sync; - -CREATE UNIQUE INDEX `IDX_sync_entity_name_id` ON `sync` ( - `entity_name`, - `entity_id` -); - -CREATE INDEX `IDX_sync_sync_date` ON `sync` ( - `sync_date` -); - --- Options - -UPDATE options SET opt_value = strftime('%Y-%m-%dT%H:%M:%S.000Z', opt_value, 'unixepoch') WHERE opt_name IN ('last_backup_date'); -UPDATE options SET date_modified = strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified, 'unixepoch'); - --- Event log - -CREATE TABLE `event_log_mig` ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - `note_id` TEXT, - `comment` TEXT, - `date_added` TEXT NOT NULL -); - -INSERT INTO event_log_mig (id, note_id, comment, date_added) - SELECT id, note_id, comment, strftime('%Y-%m-%dT%H:%M:%S.000Z', date_added, 'unixepoch') FROM event_log; - -DROP TABLE event_log; -ALTER TABLE event_log_mig RENAME TO event_log; - -CREATE INDEX `IDX_event_log_date_added` ON `event_log` ( - `date_added` -); - --- Notes - -CREATE TABLE IF NOT EXISTS "notes_mig" ( - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `is_protected` INT NOT NULL DEFAULT 0, - `is_deleted` INT NOT NULL DEFAULT 0, - `date_created` TEXT NOT NULL, - `date_modified` TEXT NOT NULL, - PRIMARY KEY(`note_id`) -); - -INSERT INTO notes_mig (note_id, note_title, note_text, is_protected, is_deleted, date_created, date_modified) - SELECT note_id, note_title, note_text, is_protected, is_deleted, - strftime('%Y-%m-%dT%H:%M:%S.000Z', date_created, 'unixepoch'), - strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified, 'unixepoch') - FROM notes; - -DROP TABLE notes; -ALTER TABLE notes_mig RENAME TO notes; - -CREATE INDEX `IDX_notes_is_deleted` ON `notes` ( - `is_deleted` -); - --- note history - -CREATE TABLE IF NOT EXISTS "notes_history_mig" ( - `note_history_id` TEXT NOT NULL PRIMARY KEY, - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `is_protected` INT NOT NULL DEFAULT 0, - `date_modified_from` TEXT NOT NULL, - `date_modified_to` TEXT NOT NULL -); - -INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to) - SELECT note_history_id, note_id, note_title, note_text, is_protected, - strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified_from, 'unixepoch'), - strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified_to, 'unixepoch') - FROM notes_history; - -DROP TABLE notes_history; -ALTER TABLE notes_history_mig RENAME TO notes_history; - -CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` ( - `note_id` -); -CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` ( - `date_modified_from` -); -CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` ( - `date_modified_to` -); - --- Source IDs - -DROP TABLE source_ids; - -CREATE TABLE `source_ids` ( - `source_id` TEXT NOT NULL, - `date_created` TEXT NOT NULL, - PRIMARY KEY(`source_id`) -); - --- Recent notes - -DROP TABLE recent_notes; - -CREATE TABLE `recent_notes` ( - `note_tree_id` TEXT NOT NULL PRIMARY KEY, - `note_path` TEXT NOT NULL, - `date_accessed` TEXT NOT NULL, - is_deleted INT -); - --- Notes tree - -CREATE TABLE IF NOT EXISTS "notes_tree_mig" ( - `note_tree_id` TEXT NOT NULL, - `note_id` TEXT NOT NULL, - `note_pid` TEXT NOT NULL, - `note_pos` INTEGER NOT NULL, - `prefix` TEXT, - `is_expanded` BOOLEAN, - `is_deleted` INTEGER NOT NULL DEFAULT 0, - `date_modified` TEXT NOT NULL, - PRIMARY KEY(`note_tree_id`) -); - -INSERT INTO notes_tree_mig (note_tree_id, note_id, note_pid, note_pos, prefix, is_expanded, is_deleted, date_modified) - SELECT note_tree_id, note_id, note_pid, note_pos, prefix, is_expanded, is_deleted, - strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified, 'unixepoch') - FROM notes_tree; - -DROP TABLE notes_tree; -ALTER TABLE notes_tree_mig RENAME TO notes_tree; - -CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` ( - `note_tree_id` -); -CREATE INDEX `IDX_notes_tree_note_id_note_pid` ON `notes_tree` ( - `note_id`, - `note_pid` -); diff --git a/db/migrations/0051__note_id_index_on_notes_tree.sql b/db/migrations/0051__note_id_index_on_notes_tree.sql deleted file mode 100644 index bc08c5d19..000000000 --- a/db/migrations/0051__note_id_index_on_notes_tree.sql +++ /dev/null @@ -1,5 +0,0 @@ -DROP index IDX_notes_tree_note_tree_id; - -CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` ( - `note_id` -); \ No newline at end of file diff --git a/db/migrations/0052__fill_sync_table.sql b/db/migrations/0052__fill_sync_table.sql deleted file mode 100644 index 86787275e..000000000 --- a/db/migrations/0052__fill_sync_table.sql +++ /dev/null @@ -1,8 +0,0 @@ -INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id) - SELECT 'notes', note_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes; - -INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id) - SELECT 'notes_tree', note_tree_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_tree; - -INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id) - SELECT 'notes_history', note_history_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_history; \ No newline at end of file diff --git a/db/migrations/0053__cleanup_inconsistencies.sql b/db/migrations/0053__cleanup_inconsistencies.sql deleted file mode 100644 index 7bea5ea94..000000000 --- a/db/migrations/0053__cleanup_inconsistencies.sql +++ /dev/null @@ -1,18 +0,0 @@ -delete from notes where note_id in ('FfZylYxt','HqzAEsR2fFEZ','KgTQDh67+1Mh','TKMbAYl0AFyQ','W+bGM185c6gw', - 'YXBdhv4dYKMy','aF4/6p1zTpIS','nsLnrrDktl/s','wkhFImoPuxky'); - -delete from notes_tree where note_tree_id in ('TTy5N2y2S6JP','TTkL3rWDexpp','TTEhtomZekUk','TTvP7zW01zwg','TTuYmMTZyKRt' - ,'TToaClamxbBF','TTKvNCe5X2dj','TTE7jFx5A0zW','TTc79bscyrHX','TTcw8ZyDy2Cc','TTdFzAOWA9hZ','TTUyVLqyIvVg','TTy85NKSBDyO' - ,'TTCyuireAWBv','TTDpVyuzbj1a','TTYznrYvAeIs','TTocvv15VMyu','TTjtxQkBT5vj','TToyyRzbBF0T','TTFt8NE9vSyZ','TTfzFZOuuDqv' - ,'TT2e2oUYcxG6','TToXselUpPAy','TTEM68gGukg0','TTkZxxwtUOzW','TTAZNxBtgmmh','TTK1YErdBE3x','TTzjKiEf54o6','TTPWd5Ou1xET' - ,'TTxQtjf22rTL','TTJAGaI4c89V','TTUQmsxSTdV3','TTGAOf5Lvr6b','TTECSDRN4ZPW','TTZZXLiGNWv4','TTxSLphulRct','TT8vld7x0qWF' - ,'TTuuxXnv2Kpw','TT3RkLZ9AI6t','TTuEbI4Cj3qC','TT4CXXRyWRqm','TTQCuFgnMqxX','TTxnDEMz1bd4','TTMOnqhBesjs','TTHblx55gRHN' - ,'TTMHW8HIGCjR','TTxzg3qqyLjw','TTluvD7yS8Rv','TT88qK2j3ggk','TTF7oHhS5ANF','TTOH275JiUSy','TToIt2dQ5tYH','TTBPgixQgbAq' - ,'TTeN46707CJl','TTDb3GC2y6nN','TTlIXFwpICko','TTE6M9AxLh2U','TTjqhB8zXjD6','TT9NPeLg4FjK','TTj12jDX7TM3','TTPRjf7EdvDX' - ,'TTBnu09pxOmn','TTZxyAkJQ9Cf','TTlvqeof2IBS','TT5R5xtIqRQf','TTiiD6hFjlVH','TTNVjGHSqNgo','TTrORSHCsAVQ','TT5Ei5fngqkv' - ,'TTQ4hdpcIX3C','TTQgxq4CoiHU','TTJayLjI6BSE','TTYyraNy0CVT','TTnAJ3AK3wHz','TTJwKcgs1s0X','TT4FiatgbLEs','TTEdp5Zx1n5F'); - -update notes_tree set is_deleted = 1 where note_tree_id in ('TTiaU9xqnrca','TTQAy9c1vDId','TTHXWBJB2Y24','TTDV8DUK2IZA' - ,'TTI5JHODZYV5','TTBEZ8TMSJV4','TT1MDWZXE8ZI','TTJV7ZOA8907','TTUGE6N99QSO','TTN0OS17T0KM'); - -delete from notes_history where note_history_id in ('KHAp5viTrrOfugzQ', 'xmhaS76piZn0QGzn', '25aL96ke8xmud9Bt'); \ No newline at end of file diff --git a/db/migrations/0054__more_cleanup_inconsistencies.sql b/db/migrations/0054__more_cleanup_inconsistencies.sql deleted file mode 100644 index 18938c153..000000000 --- a/db/migrations/0054__more_cleanup_inconsistencies.sql +++ /dev/null @@ -1,3 +0,0 @@ -DELETE FROM notes_tree WHERE note_tree_id IN ('cb94QGgnCwOD', 'c3FWKhcVYyaQ'); - -DELETE FROM notes_history WHERE note_history_id IN ('cdUD6ycs3l9h', 'OW4uh0HLtXaw'); diff --git a/db/migrations/0055__set_last_synced_push.sql b/db/migrations/0055__set_last_synced_push.sql deleted file mode 100644 index 6c5ab9c84..000000000 --- a/db/migrations/0055__set_last_synced_push.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE options SET opt_value = (SELECT MAX(id) FROM sync) WHERE opt_name = 'last_synced_push'; \ No newline at end of file diff --git a/db/migrations/0056__fill_sync_again.sql b/db/migrations/0056__fill_sync_again.sql deleted file mode 100644 index 7b446c6e4..000000000 --- a/db/migrations/0056__fill_sync_again.sql +++ /dev/null @@ -1,13 +0,0 @@ -DELETE FROM recent_notes; -DELETE FROM sync; - -INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id) - SELECT 'notes', note_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes; - -INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id) - SELECT 'notes_tree', note_tree_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_tree; - -INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id) - SELECT 'notes_history', note_history_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_history; - -UPDATE options SET opt_value = (SELECT MAX(id) FROM sync) WHERE opt_name IN ('last_synced_push', 'last_synced_pull'); \ No newline at end of file diff --git a/db/migrations/0057__add_foreign_keys.sql b/db/migrations/0057__add_foreign_keys.sql deleted file mode 100644 index 96cf9e4ec..000000000 --- a/db/migrations/0057__add_foreign_keys.sql +++ /dev/null @@ -1,101 +0,0 @@ -INSERT INTO notes (note_id, note_title, note_text, date_created, date_modified) - VALUES ('root', 'root', 'root', strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now')); - -CREATE TABLE IF NOT EXISTS "notes_mig" ( - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `is_protected` INT NOT NULL DEFAULT 0, - `is_deleted` INT NOT NULL DEFAULT 0, - `date_created` TEXT NOT NULL, - `date_modified` TEXT NOT NULL, - PRIMARY KEY(`note_id`) -); - -INSERT INTO notes_mig (note_id, note_title, note_text, is_protected, is_deleted, date_created, date_modified) - SELECT note_id, note_title, note_text, is_protected, is_deleted, date_created, date_modified FROM notes; - -DROP TABLE notes; -ALTER TABLE notes_mig RENAME TO notes; - -CREATE INDEX `IDX_notes_is_deleted` ON `notes` ( - `is_deleted` -); - -CREATE TABLE IF NOT EXISTS "notes_tree_mig" ( - `note_tree_id` TEXT NOT NULL, - `note_id` TEXT NOT NULL, - `parent_note_id` TEXT NOT NULL, - `note_position` INTEGER NOT NULL, - `prefix` TEXT, - `is_expanded` BOOLEAN, - `is_deleted` INTEGER NOT NULL DEFAULT 0, - `date_modified` TEXT NOT NULL, - FOREIGN KEY(note_id) REFERENCES notes(note_id), - FOREIGN KEY(parent_note_id) REFERENCES notes(note_id), - PRIMARY KEY(`note_tree_id`) -); - -INSERT INTO notes_tree_mig (note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified) - SELECT note_tree_id, note_id, note_pid, note_pos, prefix, is_expanded, is_deleted, date_modified FROM notes_tree; - -DROP TABLE notes_tree; -ALTER TABLE notes_tree_mig RENAME TO notes_tree; - -CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` ( - `note_tree_id` -); -CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` ( - `note_id`, - `parent_note_id` -); -CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` ( - `note_id` -); - -CREATE TABLE IF NOT EXISTS "notes_history_mig" ( - `note_history_id` TEXT NOT NULL PRIMARY KEY, - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `is_protected` INT NOT NULL DEFAULT 0, - `date_modified_from` TEXT NOT NULL, - `date_modified_to` TEXT NOT NULL, - FOREIGN KEY(note_id) REFERENCES notes(note_id) -); - -INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to) - SELECT note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to FROM notes_history; - -DROP TABLE notes_history; -ALTER TABLE notes_history_mig RENAME TO notes_history; - -CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` ( - `note_id` -); -CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` ( - `date_modified_from` -); -CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` ( - `date_modified_to` -); - -DROP TABLE recent_notes; - -CREATE TABLE `recent_notes` ( - `note_tree_id` TEXT NOT NULL PRIMARY KEY, - `note_path` TEXT NOT NULL, - `date_accessed` TEXT NOT NULL, - is_deleted INT, - FOREIGN KEY(note_tree_id) REFERENCES notes_tree(note_tree_id) -); - -DROP TABLE event_log; - -CREATE TABLE `event_log` ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - `note_id` TEXT, - `comment` TEXT, - `date_added` TEXT NOT NULL, - FOREIGN KEY(note_id) REFERENCES notes(note_id) -); \ No newline at end of file diff --git a/db/migrations/0058__remove_foreign_key_from_notes_tree.sql b/db/migrations/0058__remove_foreign_key_from_notes_tree.sql deleted file mode 100644 index aac3d68b8..000000000 --- a/db/migrations/0058__remove_foreign_key_from_notes_tree.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE TABLE IF NOT EXISTS "notes_tree_mig" ( - `note_tree_id` TEXT NOT NULL, - `note_id` TEXT NOT NULL, - `parent_note_id` TEXT NOT NULL, - `note_position` INTEGER NOT NULL, - `prefix` TEXT, - `is_expanded` BOOLEAN, - `is_deleted` INTEGER NOT NULL DEFAULT 0, - `date_modified` TEXT NOT NULL, - FOREIGN KEY(note_id) REFERENCES notes(note_id), - PRIMARY KEY(`note_tree_id`) -); - -INSERT INTO notes_tree_mig (note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified) - SELECT note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified FROM notes_tree; - -DROP TABLE notes_tree; -ALTER TABLE notes_tree_mig RENAME TO notes_tree; - -CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` ( - `note_tree_id` -); -CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` ( - `note_id`, - `parent_note_id` -); -CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` ( - `note_id` -); \ No newline at end of file diff --git a/db/migrations/0059__remove_foreign_key_again.sql b/db/migrations/0059__remove_foreign_key_again.sql deleted file mode 100644 index 22b83eaf7..000000000 --- a/db/migrations/0059__remove_foreign_key_again.sql +++ /dev/null @@ -1,28 +0,0 @@ -CREATE TABLE IF NOT EXISTS "notes_tree_mig" ( - `note_tree_id` TEXT NOT NULL, - `note_id` TEXT NOT NULL, - `parent_note_id` TEXT NOT NULL, - `note_position` INTEGER NOT NULL, - `prefix` TEXT, - `is_expanded` BOOLEAN, - `is_deleted` INTEGER NOT NULL DEFAULT 0, - `date_modified` TEXT NOT NULL, - PRIMARY KEY(`note_tree_id`) -); - -INSERT INTO notes_tree_mig (note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified) - SELECT note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified FROM notes_tree; - -DROP TABLE notes_tree; -ALTER TABLE notes_tree_mig RENAME TO notes_tree; - -CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` ( - `note_tree_id` -); -CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` ( - `note_id`, - `parent_note_id` -); -CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` ( - `note_id` -); \ No newline at end of file diff --git a/db/migrations/0060__remove_rest_of_foreign_keys.sql b/db/migrations/0060__remove_rest_of_foreign_keys.sql deleted file mode 100644 index 06db061d7..000000000 --- a/db/migrations/0060__remove_rest_of_foreign_keys.sql +++ /dev/null @@ -1,34 +0,0 @@ -CREATE TABLE IF NOT EXISTS "notes_history_mig" ( - `note_history_id` TEXT NOT NULL PRIMARY KEY, - `note_id` TEXT NOT NULL, - `note_title` TEXT, - `note_text` TEXT, - `is_protected` INT NOT NULL DEFAULT 0, - `date_modified_from` TEXT NOT NULL, - `date_modified_to` TEXT NOT NULL -); - -INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to) - SELECT note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to FROM notes_history; - -DROP TABLE notes_history; -ALTER TABLE notes_history_mig RENAME TO notes_history; - -CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` ( - `note_id` -); -CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` ( - `date_modified_from` -); -CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` ( - `date_modified_to` -); - -DROP TABLE recent_notes; - -CREATE TABLE `recent_notes` ( - `note_tree_id` TEXT NOT NULL PRIMARY KEY, - `note_path` TEXT NOT NULL, - `date_accessed` TEXT NOT NULL, - is_deleted INT -); \ No newline at end of file diff --git a/db/migrations/0061__change_index_to_unique.sql b/db/migrations/0061__change_index_to_unique.sql deleted file mode 100644 index 005658567..000000000 --- a/db/migrations/0061__change_index_to_unique.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP INDEX IDX_notes_tree_note_id_parent_note_id; - -CREATE UNIQUE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` ( - `note_id`, - `parent_note_id` -); \ No newline at end of file diff --git a/db/migrations/0062__change_index_back_to_non_unique.sql b/db/migrations/0062__change_index_back_to_non_unique.sql deleted file mode 100644 index 33b575b59..000000000 --- a/db/migrations/0062__change_index_back_to_non_unique.sql +++ /dev/null @@ -1,9 +0,0 @@ -DROP INDEX IDX_notes_tree_note_id_parent_note_id; - -CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` ( - `note_id`, - `parent_note_id` -); - --- dropping this as it's just duplicate of primary key -DROP INDEX IDX_notes_tree_note_tree_id; \ No newline at end of file diff --git a/db/migrations/0063__image_table.sql b/db/migrations/0063__image_table.sql deleted file mode 100644 index 7a3d6932e..000000000 --- a/db/migrations/0063__image_table.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE images -( - image_id TEXT PRIMARY KEY NOT NULL, - format TEXT NOT NULL, - checksum TEXT NOT NULL, - name TEXT NOT NULL, - data BLOB, - is_deleted INT NOT NULL DEFAULT 0, - date_modified TEXT NOT NULL, - date_created TEXT NOT NULL -); \ No newline at end of file diff --git a/db/migrations/0064__add_note_id_to_image_table.sql b/db/migrations/0064__add_note_id_to_image_table.sql deleted file mode 100644 index eb491fff5..000000000 --- a/db/migrations/0064__add_note_id_to_image_table.sql +++ /dev/null @@ -1,16 +0,0 @@ -DROP TABLE images; - -CREATE TABLE images -( - image_id TEXT PRIMARY KEY NOT NULL, - note_id TEXT NOT NULL, - format TEXT NOT NULL, - checksum TEXT NOT NULL, - name TEXT NOT NULL, - data BLOB, - is_deleted INT NOT NULL DEFAULT 0, - date_modified TEXT NOT NULL, - date_created TEXT NOT NULL -); - -CREATE INDEX images_note_id_index ON images (note_id); \ No newline at end of file diff --git a/db/migrations/0065__notes_image.sql b/db/migrations/0065__notes_image.sql deleted file mode 100644 index 659006fa0..000000000 --- a/db/migrations/0065__notes_image.sql +++ /dev/null @@ -1,27 +0,0 @@ -DROP TABLE images; - -CREATE TABLE images -( - image_id TEXT PRIMARY KEY NOT NULL, - format TEXT NOT NULL, - checksum TEXT NOT NULL, - name TEXT NOT NULL, - data BLOB, - is_deleted INT NOT NULL DEFAULT 0, - date_modified TEXT NOT NULL, - date_created TEXT NOT NULL -); - -CREATE TABLE notes_image -( - note_image_id TEXT PRIMARY KEY NOT NULL, - note_id TEXT NOT NULL, - image_id TEXT NOT NULL, - is_deleted INT NOT NULL DEFAULT 0, - date_modified TEXT NOT NULL, - date_created TEXT NOT NULL -); - -CREATE INDEX notes_image_note_id_index ON notes_image (note_id); -CREATE INDEX notes_image_image_id_index ON notes_image (image_id); -CREATE INDEX notes_image_note_id_image_id_index ON notes_image (note_id, image_id); \ No newline at end of file diff --git a/db/migrations/0066__create_attributes_table.sql b/db/migrations/0066__create_attributes_table.sql deleted file mode 100644 index e2b8c89f0..000000000 --- a/db/migrations/0066__create_attributes_table.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE attributes -( - attribute_id TEXT PRIMARY KEY NOT NULL, - note_id TEXT NOT NULL, - name TEXT NOT NULL, - value TEXT, - date_created TEXT NOT NULL, - date_modified TEXT NOT NULL -); - -CREATE INDEX attributes_note_id_index ON attributes (note_id); -CREATE UNIQUE INDEX attributes_note_id_name_index ON attributes (note_id, name); \ No newline at end of file diff --git a/db/migrations/0067__add_is_synced_to_options.sql b/db/migrations/0067__add_is_synced_to_options.sql deleted file mode 100644 index fb10f58af..000000000 --- a/db/migrations/0067__add_is_synced_to_options.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE options ADD COLUMN is_synced INTEGER NOT NULL DEFAULT 0; - -UPDATE options SET is_synced = 1 WHERE opt_name IN ('username', 'password_verification_hash', 'password_verification_salt', - 'password_derived_key_salt', 'encrypted_data_key', 'encrypted_data_key_iv', - 'protected_session_timeout', 'history_snapshot_time_interval'); \ No newline at end of file diff --git a/db/migrations/0068__add_note_type.sql b/db/migrations/0068__add_note_type.sql deleted file mode 100644 index 2104b11dd..000000000 --- a/db/migrations/0068__add_note_type.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE notes ADD COLUMN type TEXT NOT NULL DEFAULT 'text'; \ No newline at end of file diff --git a/db/migrations/0069__add_mime_to_note.sql b/db/migrations/0069__add_mime_to_note.sql deleted file mode 100644 index a57fd7e3d..000000000 --- a/db/migrations/0069__add_mime_to_note.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE notes ADD COLUMN mime TEXT NOT NULL DEFAULT 'text/html'; \ No newline at end of file diff --git a/db/migrations/0070__rename_columns_to_camel_case.sql b/db/migrations/0070__rename_columns_to_camel_case.sql deleted file mode 100644 index d8340bd66..000000000 --- a/db/migrations/0070__rename_columns_to_camel_case.sql +++ /dev/null @@ -1,207 +0,0 @@ -CREATE TABLE "options_mig" ( - `name` TEXT NOT NULL PRIMARY KEY, - `value` TEXT, - `dateModified` INT, - isSynced INTEGER NOT NULL DEFAULT 0); - -INSERT INTO options_mig (name, value, dateModified, isSynced) - SELECT opt_name, opt_value, date_modified, is_synced FROM options; - -DROP TABLE options; -ALTER TABLE options_mig RENAME TO options; - -CREATE TABLE "sync_mig" ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - `entityName` TEXT NOT NULL, - `entityId` TEXT NOT NULL, - `sourceId` TEXT NOT NULL, - `syncDate` TEXT NOT NULL); - -INSERT INTO sync_mig (id, entityName, entityId, sourceId, syncDate) - SELECT id, entity_name, entity_id, source_id, sync_date FROM sync; - -DROP TABLE sync; -ALTER TABLE sync_mig RENAME TO sync; - -CREATE UNIQUE INDEX `IDX_sync_entityName_entityId` ON `sync` ( - `entityName`, - `entityId` -); - -CREATE INDEX `IDX_sync_syncDate` ON `sync` ( - `syncDate` -); - -CREATE TABLE `source_ids_mig` ( - `sourceId` TEXT NOT NULL, - `dateCreated` TEXT NOT NULL, - PRIMARY KEY(`sourceId`) -); - -INSERT INTO source_ids_mig (sourceId, dateCreated) - SELECT source_id, date_created FROM source_ids; - -DROP TABLE source_ids; -ALTER TABLE source_ids_mig RENAME TO source_ids; - -CREATE TABLE "notes_mig" ( - `noteId` TEXT NOT NULL, - `title` TEXT, - `content` TEXT, - `isProtected` INT NOT NULL DEFAULT 0, - `isDeleted` INT NOT NULL DEFAULT 0, - `dateCreated` TEXT NOT NULL, - `dateModified` TEXT NOT NULL, - type TEXT NOT NULL DEFAULT 'text', - mime TEXT NOT NULL DEFAULT 'text/html', - PRIMARY KEY(`noteId`) -); - -INSERT INTO notes_mig (noteId, title, content, isProtected, isDeleted, dateCreated, dateModified, type, mime) - SELECT note_id, note_title, note_text, is_protected, is_deleted, date_created, date_modified, type, mime FROM notes; - -DROP TABLE notes; -ALTER TABLE notes_mig RENAME TO notes; - -CREATE INDEX `IDX_notes_isDeleted` ON `notes` ( - `isDeleted` -); - -CREATE TABLE `event_log_mig` ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - `noteId` TEXT, - `comment` TEXT, - `dateAdded` TEXT NOT NULL, - FOREIGN KEY(noteId) REFERENCES notes(noteId) -); - -INSERT INTO event_log_mig (id, noteId, comment, dateAdded) - SELECT id, note_id, comment, date_added FROM event_log; - -DROP TABLE event_log; -ALTER TABLE event_log_mig RENAME TO event_log; - -CREATE TABLE "note_tree" ( - `noteTreeId` TEXT NOT NULL, - `noteId` TEXT NOT NULL, - `parentNoteId` TEXT NOT NULL, - `notePosition` INTEGER NOT NULL, - `prefix` TEXT, - `isExpanded` BOOLEAN, - `isDeleted` INTEGER NOT NULL DEFAULT 0, - `dateModified` TEXT NOT NULL, - PRIMARY KEY(`noteTreeId`) -); - -INSERT INTO note_tree (noteTreeId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, dateModified) - SELECT note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified FROM notes_tree; - -DROP TABLE notes_tree; - -CREATE INDEX `IDX_note_tree_noteId` ON `note_tree` ( - `noteId` -); - -CREATE INDEX `IDX_note_tree_noteId_parentNoteId` ON `note_tree` ( - `noteId`, - `parentNoteId` -); - -CREATE TABLE "note_revisions" ( - `noteRevisionId` TEXT NOT NULL PRIMARY KEY, - `noteId` TEXT NOT NULL, - `title` TEXT, - `content` TEXT, - `isProtected` INT NOT NULL DEFAULT 0, - `dateModifiedFrom` TEXT NOT NULL, - `dateModifiedTo` TEXT NOT NULL -); - -INSERT INTO note_revisions (noteRevisionId, noteId, title, content, isProtected, dateModifiedFrom, dateModifiedTo) - SELECT note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to FROM notes_history; - -DROP TABLE notes_history; - -CREATE INDEX `IDX_note_revisions_noteId` ON `note_revisions` ( - `noteId` -); - -CREATE INDEX `IDX_note_revisions_dateModifiedFrom` ON `note_revisions` ( - `dateModifiedFrom` -); - -CREATE INDEX `IDX_note_revisions_dateModifiedTo` ON `note_revisions` ( - `dateModifiedTo` -); - -CREATE TABLE `recent_notes_mig` ( - `noteTreeId` TEXT NOT NULL PRIMARY KEY, - `notePath` TEXT NOT NULL, - `dateAccessed` TEXT NOT NULL, - isDeleted INT -); - -INSERT INTO recent_notes_mig (noteTreeId, notePath, dateAccessed, isDeleted) - SELECT note_tree_id, note_path, date_accessed, is_deleted FROM recent_notes; - -DROP TABLE recent_notes; -ALTER TABLE recent_notes_mig RENAME TO recent_notes; - -CREATE TABLE images_mig -( - imageId TEXT PRIMARY KEY NOT NULL, - format TEXT NOT NULL, - checksum TEXT NOT NULL, - name TEXT NOT NULL, - data BLOB, - isDeleted INT NOT NULL DEFAULT 0, - dateModified TEXT NOT NULL, - dateCreated TEXT NOT NULL -); - -INSERT INTO images_mig (imageId, format, checksum, name, data, isDeleted, dateModified, dateCreated) - SELECT image_id, format, checksum, name, data, is_deleted, date_modified, date_created FROM images; - -DROP TABLE images; -ALTER TABLE images_mig RENAME TO images; - -CREATE TABLE note_images -( - noteImageId TEXT PRIMARY KEY NOT NULL, - noteId TEXT NOT NULL, - imageId TEXT NOT NULL, - isDeleted INT NOT NULL DEFAULT 0, - dateModified TEXT NOT NULL, - dateCreated TEXT NOT NULL -); - -INSERT INTO note_images (noteImageId, noteId, imageId, isDeleted, dateModified, dateCreated) - SELECT note_image_id, note_id, image_id, is_deleted, date_modified, date_created FROM notes_image; - -DROP TABLE notes_image; - -CREATE INDEX IDX_note_images_noteId ON note_images (noteId); - -CREATE INDEX IDX_note_images_imageId ON note_images (imageId); - -CREATE INDEX IDX_note_images_noteId_imageId ON note_images (noteId, imageId); - -CREATE TABLE attributes_mig -( - attributeId TEXT PRIMARY KEY NOT NULL, - noteId TEXT NOT NULL, - name TEXT NOT NULL, - value TEXT, - dateCreated TEXT NOT NULL, - dateModified TEXT NOT NULL -); - -INSERT INTO attributes_mig (attributeId, noteId, name, value, dateCreated, dateModified) - SELECT attribute_id, note_id, name, value, date_created, date_modified FROM attributes; - -DROP TABLE attributes; -ALTER TABLE attributes_mig RENAME TO attributes; - -CREATE INDEX IDX_attributes_noteId ON attributes (noteId); - -CREATE UNIQUE INDEX IDX_attributes_noteId_name ON attributes (noteId, name); diff --git a/db/migrations/0071__fix_sync_entity_names.sql b/db/migrations/0071__fix_sync_entity_names.sql deleted file mode 100644 index a165625d7..000000000 --- a/db/migrations/0071__fix_sync_entity_names.sql +++ /dev/null @@ -1,4 +0,0 @@ -UPDATE sync SET entityName = 'note_images' WHERE entityName = 'notes_image'; -UPDATE sync SET entityName = 'note_tree' WHERE entityName = 'notes_tree'; -UPDATE sync SET entityName = 'note_revisions' WHERE entityName = 'notes_history'; -UPDATE sync SET entityName = 'note_reordering' WHERE entityName = 'notes_reordering'; \ No newline at end of file diff --git a/db/migrations/0072__allow_multiple_attributes_per_note.sql b/db/migrations/0072__allow_multiple_attributes_per_note.sql deleted file mode 100644 index 9023a6ab1..000000000 --- a/db/migrations/0072__allow_multiple_attributes_per_note.sql +++ /dev/null @@ -1 +0,0 @@ -DROP INDEX IDX_attributes_noteId_name; \ No newline at end of file diff --git a/db/migrations/0073__add_isDeleted_to_attributes.sql b/db/migrations/0073__add_isDeleted_to_attributes.sql deleted file mode 100644 index 17951cb1f..000000000 --- a/db/migrations/0073__add_isDeleted_to_attributes.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE attributes ADD COLUMN isDeleted INT NOT NULL DEFAULT 0; \ No newline at end of file diff --git a/db/migrations/0074__add_position_to_attribute.sql b/db/migrations/0074__add_position_to_attribute.sql deleted file mode 100644 index 350a8aa31..000000000 --- a/db/migrations/0074__add_position_to_attribute.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE attributes ADD COLUMN position INT NOT NULL DEFAULT 0; \ No newline at end of file diff --git a/db/migrations/0075__add_api_token.sql b/db/migrations/0075__add_api_token.sql deleted file mode 100644 index 3dadbc3f4..000000000 --- a/db/migrations/0075__add_api_token.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE IF NOT EXISTS "api_tokens" -( - apiTokenId TEXT PRIMARY KEY NOT NULL, - token TEXT NOT NULL, - dateCreated TEXT NOT NULL, - isDeleted INT NOT NULL DEFAULT 0 -); \ No newline at end of file diff --git a/db/migrations/0076__add_attribute_name_index.sql b/db/migrations/0076__add_attribute_name_index.sql deleted file mode 100644 index 6911a3f2c..000000000 --- a/db/migrations/0076__add_attribute_name_index.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE INDEX IDX_attributes_name_value ON attributes (name, value); \ No newline at end of file diff --git a/db/migrations/0077__non_null_attribute_value.sql b/db/migrations/0077__non_null_attribute_value.sql deleted file mode 100644 index 8fac721c6..000000000 --- a/db/migrations/0077__non_null_attribute_value.sql +++ /dev/null @@ -1,23 +0,0 @@ -UPDATE attributes SET value = '' WHERE value IS NULL; - -CREATE TABLE IF NOT EXISTS "attributes_mig" -( - attributeId TEXT PRIMARY KEY NOT NULL, - noteId TEXT NOT NULL, - name TEXT NOT NULL, - value TEXT NOT NULL DEFAULT '', - position INT NOT NULL DEFAULT 0, - dateCreated TEXT NOT NULL, - dateModified TEXT NOT NULL, - isDeleted INT NOT NULL -); - -INSERT INTO attributes_mig (attributeId, noteId, name, value, position, dateCreated, dateModified, isDeleted) - SELECT attributeId, noteId, name, value, position, dateCreated, dateModified, isDeleted FROM attributes; - -DROP TABLE attributes; - -ALTER TABLE attributes_mig RENAME TO attributes; - -CREATE INDEX IDX_attributes_noteId ON attributes (noteId); -CREATE INDEX IDX_attributes_name_value ON attributes (name, value); \ No newline at end of file diff --git a/db/migrations/0078__javascript_type.sql b/db/migrations/0078__javascript_type.sql deleted file mode 100644 index 804a6066c..000000000 --- a/db/migrations/0078__javascript_type.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE notes SET mime = 'application/javascript;env=frontend' WHERE type = 'code' AND mime = 'application/javascript'; \ No newline at end of file diff --git a/db/migrations/0079__rename_note_tree.sql b/db/migrations/0079__rename_note_tree.sql deleted file mode 100644 index 4122567f2..000000000 --- a/db/migrations/0079__rename_note_tree.sql +++ /dev/null @@ -1,38 +0,0 @@ -CREATE TABLE "branches" ( - `branchId` TEXT NOT NULL, - `noteId` TEXT NOT NULL, - `parentNoteId` TEXT NOT NULL, - `notePosition` INTEGER NOT NULL, - `prefix` TEXT, - `isExpanded` BOOLEAN, - `isDeleted` INTEGER NOT NULL DEFAULT 0, - `dateModified` TEXT NOT NULL, - PRIMARY KEY(`branchId`) -); - -INSERT INTO branches (branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, dateModified) - SELECT noteTreeId, noteId, parentNoteId, notePosition, prefix, isExpanded, isDeleted, dateModified FROM note_tree; - -DROP TABLE note_tree; - -CREATE INDEX `IDX_branches_noteId` ON `branches` ( - `noteId` -); - -CREATE INDEX `IDX_branches_noteId_parentNoteId` ON `branches` ( - `noteId`, - `parentNoteId` -); - -CREATE TABLE `recent_notes_mig` ( - `branchId` TEXT NOT NULL PRIMARY KEY, - `notePath` TEXT NOT NULL, - `dateAccessed` TEXT NOT NULL, - isDeleted INT -); - -INSERT INTO recent_notes_mig (branchId, notePath, dateAccessed, isDeleted) - SELECT noteTreeId, notePath, dateAccessed, isDeleted FROM recent_notes; - -DROP TABLE recent_notes; -ALTER TABLE recent_notes_mig RENAME TO recent_notes; \ No newline at end of file diff --git a/db/migrations/0080__rename_attributes_to_labels.sql b/db/migrations/0080__rename_attributes_to_labels.sql deleted file mode 100644 index 201922fea..000000000 --- a/db/migrations/0080__rename_attributes_to_labels.sql +++ /dev/null @@ -1,22 +0,0 @@ -create table labels -( - labelId TEXT not null primary key, - noteId TEXT not null, - name TEXT not null, - value TEXT default '' not null, - position INT default 0 not null, - dateCreated TEXT not null, - dateModified TEXT not null, - isDeleted INT not null -); - -create index IDX_labels_name_value - on labels (name, value); - -create index IDX_labels_noteId - on labels (noteId); - -INSERT INTO labels (labelId, noteId, name, "value", "position", dateCreated, dateModified, isDeleted) - SELECT attributeId, noteId, name, "value", "position", dateCreated, dateModified, isDeleted FROM attributes; - -DROP TABLE attributes; \ No newline at end of file diff --git a/db/migrations/0081__rename_history_snapshot_time_interval.sql b/db/migrations/0081__rename_history_snapshot_time_interval.sql deleted file mode 100644 index 8416ec760..000000000 --- a/db/migrations/0081__rename_history_snapshot_time_interval.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE options SET name = 'note_revision_snapshot_time_interval' WHERE name = 'history_snapshot_time_interval'; \ No newline at end of file diff --git a/db/migrations/0082__camelCase_options.sql b/db/migrations/0082__camelCase_options.sql deleted file mode 100644 index 9dd45d6a1..000000000 --- a/db/migrations/0082__camelCase_options.sql +++ /dev/null @@ -1,14 +0,0 @@ -UPDATE "options" SET "name" = 'passwordVerificationHash' WHERE "name" = 'password_verification_hash'; -UPDATE "options" SET "name" = 'dbVersion' WHERE "name" = 'db_version'; -UPDATE "options" SET "name" = 'passwordDerivedKeySalt' WHERE "name" = 'password_derived_key_salt'; -UPDATE "options" SET "name" = 'documentId' WHERE "name" = 'document_id'; -UPDATE "options" SET "name" = 'lastSyncedPull' WHERE "name" = 'last_synced_pull'; -UPDATE "options" SET "name" = 'startNotePath' WHERE "name" = 'start_note_path'; -UPDATE "options" SET "name" = 'lastSyncedPush' WHERE "name" = 'last_synced_push'; -UPDATE "options" SET "name" = 'documentSecret' WHERE "name" = 'document_secret'; -UPDATE "options" SET "name" = 'lastBackupDate' WHERE "name" = 'last_backup_date'; -UPDATE "options" SET "name" = 'noteRevisionSnapshotTimeInterval' WHERE "name" = 'note_revision_snapshot_time_interval'; -UPDATE "options" SET "name" = 'protectedSessionTimeout' WHERE "name" = 'protected_session_timeout'; -UPDATE "options" SET "name" = 'encryptedDataKey' WHERE "name" = 'encrypted_data_key'; -UPDATE "options" SET "name" = 'encryptedDataKeyIv' WHERE "name" = 'encrypted_data_key_iv'; -UPDATE "options" SET "name" = 'passwordVerificationSalt' WHERE "name" = 'password_verification_salt'; diff --git a/db/migrations/0083__camelCase_labels.sql b/db/migrations/0083__camelCase_labels.sql deleted file mode 100644 index fa318b6c4..000000000 --- a/db/migrations/0083__camelCase_labels.sql +++ /dev/null @@ -1,7 +0,0 @@ -UPDATE labels SET name = 'disableVersioning' WHERE name = 'disable_versioning'; -UPDATE labels SET name = 'calendarRoot' WHERE name = 'calendar_root'; -UPDATE labels SET name = 'hideInAutocomplete' WHERE name = 'hide_in_autocomplete'; -UPDATE labels SET name = 'excludeFromExport' WHERE name = 'exclude_from_export'; -UPDATE labels SET name = 'manualTransactionHandling' WHERE name = 'manual_transaction_handling'; -UPDATE labels SET name = 'disableInclusion' WHERE name = 'disable_inclusion'; -UPDATE labels SET name = 'appCss' WHERE name = 'app_css'; \ No newline at end of file diff --git a/db/migrations/0084__camelCase_reddit_ids.sql b/db/migrations/0084__camelCase_reddit_ids.sql deleted file mode 100644 index cb0cc2e71..000000000 --- a/db/migrations/0084__camelCase_reddit_ids.sql +++ /dev/null @@ -1,4 +0,0 @@ -UPDATE labels SET name = 'redditId' WHERE name = 'reddit_id'; -UPDATE labels SET name = 'redditKind' WHERE name = 'reddit_kind'; -UPDATE labels SET name = 'redditCreatedUtc' WHERE name = 'reddit_created_utc'; -UPDATE labels SET name = 'redditDateNote' WHERE name = 'reddit_date_note'; diff --git a/db/migrations/0085__camelCase_run_values.sql b/db/migrations/0085__camelCase_run_values.sql deleted file mode 100644 index 8754cef5d..000000000 --- a/db/migrations/0085__camelCase_run_values.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE labels SET value = 'frontendStartup' WHERE value = 'frontend_startup'; -UPDATE labels SET value = 'backendStartup' WHERE value = 'backend_startup'; diff --git a/db/migrations/0086__camelCase_custom_labels.sql b/db/migrations/0086__camelCase_custom_labels.sql deleted file mode 100644 index a94a72e1e..000000000 --- a/db/migrations/0086__camelCase_custom_labels.sql +++ /dev/null @@ -1,7 +0,0 @@ -UPDATE labels SET name = 'dateData' WHERE name = 'date_data'; -UPDATE labels SET name = 'dateNote' WHERE name = 'date_note'; -UPDATE labels SET name = 'fileSize' WHERE name = 'file_size'; -UPDATE labels SET name = 'hideInAutocomplete' WHERE name = 'hide_in_autocomplete'; -UPDATE labels SET name = 'monthNote' WHERE name = 'month_note'; -UPDATE labels SET name = 'originalFileName' WHERE name = 'original_file_name'; -UPDATE labels SET name = 'yearNote' WHERE name = 'year_note'; diff --git a/db/migrations/0087__add_type_mime_to_note_revision.sql b/db/migrations/0087__add_type_mime_to_note_revision.sql deleted file mode 100644 index f4b6629e3..000000000 --- a/db/migrations/0087__add_type_mime_to_note_revision.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE note_revisions ADD type TEXT DEFAULT '' NOT NULL; -ALTER TABLE note_revisions ADD mime TEXT DEFAULT '' NOT NULL; - -UPDATE note_revisions SET type = (SELECT type FROM notes WHERE notes.noteId = note_revisions.noteId); -UPDATE note_revisions SET mime = (SELECT mime FROM notes WHERE notes.noteId = note_revisions.noteId); \ No newline at end of file diff --git a/db/migrations/0088__non_null_note_title_content.sql b/db/migrations/0088__non_null_note_title_content.sql deleted file mode 100644 index 313c2551b..000000000 --- a/db/migrations/0088__non_null_note_title_content.sql +++ /dev/null @@ -1,34 +0,0 @@ -CREATE TABLE event_logc027 -( - id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - noteId TEXT, - comment TEXT, - dateAdded TEXT NOT NULL -); -INSERT INTO event_logc027(id, noteId, comment, dateAdded) SELECT id, noteId, comment, dateAdded FROM event_log; -DROP TABLE event_log; -ALTER TABLE event_logc027 RENAME TO event_log; - -CREATE TABLE IF NOT EXISTS "notes_mig" ( - `noteId` TEXT NOT NULL, - `title` TEXT NOT NULL DEFAULT "unnamed", - `content` TEXT NOT NULL DEFAULT "", - `isProtected` INT NOT NULL DEFAULT 0, - `isDeleted` INT NOT NULL DEFAULT 0, - `dateCreated` TEXT NOT NULL, - `dateModified` TEXT NOT NULL, - type TEXT NOT NULL DEFAULT 'text', - mime TEXT NOT NULL DEFAULT 'text/html', - PRIMARY KEY(`noteId`) -); - -INSERT INTO notes_mig (noteId, title, content, isProtected, isDeleted, dateCreated, dateModified, type, mime) - SELECT noteId, title, content, isProtected, isDeleted, dateCreated, dateModified, type, mime FROM notes; - -DROP TABLE notes; - -ALTER TABLE notes_mig RENAME TO notes; - -CREATE INDEX `IDX_notes_isDeleted` ON `notes` ( - `isDeleted` -); \ No newline at end of file diff --git a/db/migrations/0089__add_root_branch.sql b/db/migrations/0089__add_root_branch.sql deleted file mode 100644 index 0c88be74a..000000000 --- a/db/migrations/0089__add_root_branch.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO branches (branchId, noteId, parentNoteId, notePosition, prefix, isExpanded, dateModified) - VALUES ('root', 'root', 'none', 0, null, 1, '2018-01-01T00:00:00.000Z'); - -INSERT INTO sync (entityName, entityId, sourceId, syncDate) - VALUES ('branches' ,'root', 'SYNC_FILL', '2018-01-01T00:00:00.000Z'); \ No newline at end of file diff --git a/db/migrations/0090__branch_index.sql b/db/migrations/0090__branch_index.sql deleted file mode 100644 index 88d396a74..000000000 --- a/db/migrations/0090__branch_index.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE INDEX IDX_branches_parentNoteId ON branches (parentNoteId); \ No newline at end of file diff --git a/db/migrations/0091__drop_isDeleted_index.sql b/db/migrations/0091__drop_isDeleted_index.sql deleted file mode 100644 index 4d547394b..000000000 --- a/db/migrations/0091__drop_isDeleted_index.sql +++ /dev/null @@ -1,2 +0,0 @@ --- index confuses planner and is mostly useless anyway since we're mostly used in non-deleted notes (which are presumably majority) -DROP INDEX IDX_notes_isDeleted; \ No newline at end of file diff --git a/db/migrations/0092__add_type_index.sql b/db/migrations/0092__add_type_index.sql deleted file mode 100644 index 955d35dc6..000000000 --- a/db/migrations/0092__add_type_index.sql +++ /dev/null @@ -1,2 +0,0 @@ -create index IDX_notes_type - on notes (type); \ No newline at end of file diff --git a/db/migrations/0093__add_hash_field.sql b/db/migrations/0093__add_hash_field.sql deleted file mode 100644 index 489ff1061..000000000 --- a/db/migrations/0093__add_hash_field.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE notes ADD hash TEXT DEFAULT "" NOT NULL; -ALTER TABLE branches ADD hash TEXT DEFAULT "" NOT NULL; -ALTER TABLE note_revisions ADD hash TEXT DEFAULT "" NOT NULL; -ALTER TABLE recent_notes ADD hash TEXT DEFAULT "" NOT NULL; -ALTER TABLE options ADD hash TEXT DEFAULT "" NOT NULL; -ALTER TABLE note_images ADD hash TEXT DEFAULT "" NOT NULL; -ALTER TABLE images ADD hash TEXT DEFAULT "" NOT NULL; -ALTER TABLE labels ADD hash TEXT DEFAULT "" NOT NULL; -ALTER TABLE api_tokens ADD hash TEXT DEFAULT "" NOT NULL; \ No newline at end of file diff --git a/db/migrations/0094__unify_auditing_fields.sql b/db/migrations/0094__unify_auditing_fields.sql deleted file mode 100644 index 387528071..000000000 --- a/db/migrations/0094__unify_auditing_fields.sql +++ /dev/null @@ -1,30 +0,0 @@ -ALTER TABLE branches ADD dateCreated TEXT NOT NULL DEFAULT '1970-01-01T00:00:00.000Z'; - -CREATE TABLE `event_log_mig` ( - `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - `noteId` TEXT, - `comment` TEXT, - `dateCreated` TEXT NOT NULL -); - -INSERT INTO event_log_mig (id, noteId, comment, dateCreated) -SELECT id, noteId, comment, dateAdded FROM event_log; - -DROP TABLE event_log; -ALTER TABLE event_log_mig RENAME TO event_log; - -ALTER TABLE options ADD dateCreated TEXT NOT NULL DEFAULT '1970-01-01T00:00:00.000Z'; - -CREATE TABLE `recent_notes_mig` ( - `branchId` TEXT NOT NULL PRIMARY KEY, - `notePath` TEXT NOT NULL, - hash TEXT DEFAULT "" NOT NULL, - `dateCreated` TEXT NOT NULL, - isDeleted INT -); - -INSERT INTO recent_notes_mig (branchId, notePath, hash, dateCreated, isDeleted) -SELECT branchId, notePath, hash, dateAccessed, isDeleted FROM recent_notes; - -DROP TABLE recent_notes; -ALTER TABLE recent_notes_mig RENAME TO recent_notes; \ No newline at end of file diff --git a/db/migrations/0095__mime_type_for_render.sql b/db/migrations/0095__mime_type_for_render.sql deleted file mode 100644 index f23e43c12..000000000 --- a/db/migrations/0095__mime_type_for_render.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE notes SET mime = 'text/html' WHERE type = 'render'; \ No newline at end of file diff --git a/db/migrations/0096__unify_surrogate_keys.sql b/db/migrations/0096__unify_surrogate_keys.sql deleted file mode 100644 index a7e49ac7e..000000000 --- a/db/migrations/0096__unify_surrogate_keys.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE TABLE `event_log_mig` ( - `eventId` TEXT NOT NULL PRIMARY KEY, - `noteId` TEXT, - `comment` TEXT, - `dateCreated` TEXT NOT NULL -); - -INSERT INTO event_log_mig (eventId, noteId, comment, dateCreated) -SELECT id, noteId, comment, dateCreated FROM event_log; - -DROP TABLE event_log; -ALTER TABLE event_log_mig RENAME TO event_log; - -create table options_mig -( - optionId TEXT NOT NULL PRIMARY KEY, - name TEXT not null, - value TEXT, - dateModified INT, - isSynced INTEGER default 0 not null, - hash TEXT default "" not null, - dateCreated TEXT default '1970-01-01T00:00:00.000Z' not null -); - -INSERT INTO options_mig (optionId, name, value, dateModified, isSynced, hash, dateCreated) - SELECT name || "_key", name, value, dateModified, isSynced, hash, dateCreated FROM options; - -DROP TABLE options; -ALTER TABLE options_mig RENAME TO options; \ No newline at end of file diff --git a/db/migrations/0097__add_zoomFactor.sql b/db/migrations/0097__add_zoomFactor.sql deleted file mode 100644 index b371a3dc7..000000000 --- a/db/migrations/0097__add_zoomFactor.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO options (optionId, name, value, dateCreated, dateModified, isSynced) -VALUES ('zoomFactor_key', 'zoomFactor', '1.0', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0); \ No newline at end of file diff --git a/db/migrations/0098__rename_hideInAutocomplete.sql b/db/migrations/0098__rename_hideInAutocomplete.sql deleted file mode 100644 index a656e1f70..000000000 --- a/db/migrations/0098__rename_hideInAutocomplete.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE labels SET name = 'archived' WHERE name = 'hideInAutocomplete' \ No newline at end of file diff --git a/db/migrations/0099__add_theme_option.sql b/db/migrations/0099__add_theme_option.sql deleted file mode 100644 index e41fc4bcc..000000000 --- a/db/migrations/0099__add_theme_option.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO options (optionId, name, value, dateCreated, dateModified, isSynced) -VALUES ('theme_key', 'theme', 'white', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0); \ No newline at end of file diff --git a/db/migrations/0100__remove_optionId.sql b/db/migrations/0100__remove_optionId.sql deleted file mode 100644 index cda7146bb..000000000 --- a/db/migrations/0100__remove_optionId.sql +++ /dev/null @@ -1,15 +0,0 @@ -create table options_mig -( - name TEXT not null PRIMARY KEY, - value TEXT, - dateModified INT, - isSynced INTEGER default 0 not null, - hash TEXT default "" not null, - dateCreated TEXT default '1970-01-01T00:00:00.000Z' not null -); - -INSERT INTO options_mig (name, value, dateModified, isSynced, hash, dateCreated) -SELECT name, value, dateModified, isSynced, hash, dateCreated FROM options; - -DROP TABLE options; -ALTER TABLE options_mig RENAME TO options; \ No newline at end of file diff --git a/db/migrations/0101__add_sync_options.sql b/db/migrations/0101__add_sync_options.sql deleted file mode 100644 index 62dc9a5e2..000000000 --- a/db/migrations/0101__add_sync_options.sql +++ /dev/null @@ -1,8 +0,0 @@ -INSERT INTO options (name, value, dateCreated, dateModified, isSynced) -VALUES ('syncServerHost', '', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0); - -INSERT INTO options (name, value, dateCreated, dateModified, isSynced) -VALUES ('syncServerTimeout', '5000', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0); - -INSERT INTO options (name, value, dateCreated, dateModified, isSynced) -VALUES ('syncProxy', '', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0); \ No newline at end of file diff --git a/db/migrations/0102__fix_sync_entityIds.sql b/db/migrations/0102__fix_sync_entityIds.sql deleted file mode 100644 index 15e565340..000000000 --- a/db/migrations/0102__fix_sync_entityIds.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM sync WHERE entityName = 'note_tree'; -DELETE FROM sync WHERE entityName = 'attributes'; diff --git a/db/migrations/0103__add_initialized_option.sql b/db/migrations/0103__add_initialized_option.sql deleted file mode 100644 index 86d0e6768..000000000 --- a/db/migrations/0103__add_initialized_option.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO options (name, value, dateCreated, dateModified, isSynced) -VALUES ('initialized', 'true', '2018-06-01T03:35:55.041Z', '2018-06-01T03:35:55.041Z', 0); \ No newline at end of file diff --git a/db/migrations/0104__fill_sync_rows_for_options.js b/db/migrations/0104__fill_sync_rows_for_options.js deleted file mode 100644 index 4bb893f34..000000000 --- a/db/migrations/0104__fill_sync_rows_for_options.js +++ /dev/null @@ -1,4 +0,0 @@ -const syncTableService = require('../../src/services/entity_changes.js'); - -// options has not been filled so far which caused problems with clean-slate sync. -module.exports = async () => await syncTableService.fillAllSyncRows(); diff --git a/db/migrations/0105__delete_content_from_soft_deleted_notes.sql b/db/migrations/0105__delete_content_from_soft_deleted_notes.sql deleted file mode 100644 index d594841ee..000000000 --- a/db/migrations/0105__delete_content_from_soft_deleted_notes.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE notes SET content = '' WHERE isDeleted = 1; -UPDATE note_revisions SET content = '' WHERE (SELECT isDeleted FROM notes WHERE noteId = note_revisions.noteId) = 1; \ No newline at end of file diff --git a/db/migrations/0106__add_relations_table.sql b/db/migrations/0106__add_relations_table.sql deleted file mode 100644 index 9cc5cb84e..000000000 --- a/db/migrations/0106__add_relations_table.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE relations -( - relationId TEXT not null primary key, - sourceNoteId TEXT not null, - name TEXT not null, - targetNoteId TEXT not null, - position INT default 0 not null, - dateCreated TEXT not null, - dateModified TEXT not null, - isDeleted INT not null - , hash TEXT DEFAULT "" NOT NULL); -CREATE INDEX IDX_relation_sourceNoteId - on relations (sourceNoteId); -CREATE INDEX IDX_relation_targetNoteId - on relations (targetNoteId); \ No newline at end of file diff --git a/db/migrations/0107__add_inheritable_attribute_to_relations.sql b/db/migrations/0107__add_inheritable_attribute_to_relations.sql deleted file mode 100644 index 282c13f12..000000000 --- a/db/migrations/0107__add_inheritable_attribute_to_relations.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE relations ADD isInheritable int DEFAULT 0 NULL; \ No newline at end of file diff --git a/db/migrations/0108__new_backup_options.sql b/db/migrations/0108__new_backup_options.sql deleted file mode 100644 index 4a4cb94d9..000000000 --- a/db/migrations/0108__new_backup_options.sql +++ /dev/null @@ -1,9 +0,0 @@ -UPDATE options SET name = 'lastDailyBackupDate' WHERE name = 'lastBackupDate'; - -INSERT INTO options (name, value, dateCreated, dateModified, isSynced) -VALUES ('lastWeeklyBackupDate', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0); - -INSERT INTO options (name, value, dateCreated, dateModified, isSynced) -VALUES ('lastMonthlyBackupDate', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', '2018-07-29T18:31:00.874Z', 0); - --- these options are not synced so no need to fix sync rows \ No newline at end of file diff --git a/db/migrations/0109__create_attributes.sql b/db/migrations/0109__create_attributes.sql deleted file mode 100644 index 526a446e7..000000000 --- a/db/migrations/0109__create_attributes.sql +++ /dev/null @@ -1,27 +0,0 @@ -create table attributes -( - attributeId TEXT not null primary key, - noteId TEXT not null, - type TEXT not null, - name TEXT not null, - value TEXT default '' not null, - position INT default 0 not null, - dateCreated TEXT not null, - dateModified TEXT not null, - isDeleted INT not null, - hash TEXT default "" not null); - -create index IDX_attributes_name_value - on attributes (name, value); - -create index IDX_attributes_value - on attributes (value); - -create index IDX_attributes_noteId - on attributes (noteId); - -INSERT INTO attributes (attributeId, noteId, type, name, value, position, dateCreated, dateModified, isDeleted, hash) -SELECT labelId, noteId, 'label', name, value, position, dateCreated, dateModified, isDeleted, hash FROM labels; - -INSERT INTO attributes (attributeId, noteId, type, name, value, position, dateCreated, dateModified, isDeleted, hash) -SELECT relationId, sourceNoteId, 'relation', name, targetNoteId, position, dateCreated, dateModified, isDeleted, hash FROM relations; diff --git a/db/migrations/0110__add_isInheritable_to_attributes.sql b/db/migrations/0110__add_isInheritable_to_attributes.sql deleted file mode 100644 index 753e47a7f..000000000 --- a/db/migrations/0110__add_isInheritable_to_attributes.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE attributes ADD isInheritable int DEFAULT 0 NULL; \ No newline at end of file diff --git a/db/migrations/0111__cleanup_labels_and_relations.sql b/db/migrations/0111__cleanup_labels_and_relations.sql deleted file mode 100644 index 795d88393..000000000 --- a/db/migrations/0111__cleanup_labels_and_relations.sql +++ /dev/null @@ -1,4 +0,0 @@ -DROP TABLE relations; -DROP TABLE labels; - -DELETE FROM sync WHERE entityName = 'relations' OR entityName = 'labels'; \ No newline at end of file diff --git a/db/migrations/0112__rename_inheritAttributes.sql b/db/migrations/0112__rename_inheritAttributes.sql deleted file mode 100644 index 5cb85978a..000000000 --- a/db/migrations/0112__rename_inheritAttributes.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE attributes SET name = 'template' WHERE name = 'inheritAttributes'; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d39ae942c..6d74058e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -989,9 +989,9 @@ } }, "acorn": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.5.tgz", - "integrity": "sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg==" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.0.tgz", + "integrity": "sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==" }, "acorn-globals": { "version": "6.0.0", @@ -1894,9 +1894,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001197", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001197.tgz", - "integrity": "sha512-8aE+sqBqtXz4G8g35Eg/XEaFr2N7rd/VQ6eABGBmNtcB8cN6qNJhMi6oSFy4UWWZgqgL3filHT8Nha4meu3tsw==", + "version": "1.0.30001199", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001199.tgz", + "integrity": "sha512-ifbK2eChUCFUwGhlEzIoVwzFt1+iriSjyKKFYNfv6hN34483wyWpLLavYQXhnR036LhkdUYaSDpHg1El++VgHQ==", "dev": true }, "caseless": { @@ -2886,9 +2886,9 @@ } }, "electron": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-12.0.0.tgz", - "integrity": "sha512-p6oxZ4LG82hopPGAsIMOjyoL49fr6cexyFNH0kADA9Yf+mJ72DN7bjvBG+6V7r6QKhwYgsSsW8RpxBeVOUbxVQ==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-12.0.1.tgz", + "integrity": "sha512-4bTfLSTmuFkMxq3RMyjd8DxuzbxI1Bde879XDrBA4kFWbKhZ3hfXqHXQz3129eCmcLre5odcNsWq7/xzyJilMA==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -3053,9 +3053,9 @@ } }, "electron-dl": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-3.2.0.tgz", - "integrity": "sha512-Wz6YZi0fwy/hmdkrtrBwj7W4JlrFd1tY5jvNdLHd0PUTlJFJ6pGi9mPQGtZRdjodkXYpaiD1uio+wh01hqrZNg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-3.2.1.tgz", + "integrity": "sha512-k5DFjocJlXbrjshO1zeWe/Gz7HkGwCgnehHPemiyzN2B/LfLlnbIX7sCj5F+huTwZ2l+nQehTI4IR37xvCn6FQ==", "requires": { "ext-name": "^5.0.0", "pupa": "^2.0.1", @@ -3593,9 +3593,9 @@ } }, "electron-to-chromium": { - "version": "1.3.682", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.682.tgz", - "integrity": "sha512-zok2y37qR00U14uM6qBz/3iIjWHom2eRfC2S1StA0RslP7x34jX+j4mxv80t8OEOHLJPVG54ZPeaFxEI7gPrwg==", + "version": "1.3.687", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.687.tgz", + "integrity": "sha512-IpzksdQNl3wdgkzf7dnA7/v10w0Utf1dF2L+B4+gKrloBrxCut+au+kky3PYvle3RMdSxZP+UiCZtLbcYRxSNQ==", "dev": true }, "electron-window-state": { @@ -4903,9 +4903,9 @@ "dev": true }, "is-svg": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.2.1.tgz", - "integrity": "sha512-PHx3ANecKsKNl5y5+Jvt53Y4J7MfMpbNZkv384QNiswMKAWIbvcqbPz+sYbFKJI8Xv3be01GSFniPmoaP+Ai5A==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.2.2.tgz", + "integrity": "sha512-JlA7Mc7mfWjdxxTkJ094oUK9amGD7gQaj5xA/NCY0vlVvZ1stmj4VX+bRuwOMN93IHRZ2ctpPH/0FO6DqvQ5Rw==", "requires": { "html-comment-regex": "^1.1.2" } @@ -5108,9 +5108,9 @@ } }, "jsdom": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.0.tgz", - "integrity": "sha512-QxZH0nmDTnTTVI0YDm4RUlaUPl5dcyn62G5TMDNfMmTW+J1u1v9gCR8WR+WZ6UghAa7nKJjDOFaI00eMMWvJFQ==", + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.1.tgz", + "integrity": "sha512-pF73EOsJgwZekbDHEY5VO/yKXUkab/DuvrQB/ANVizbr6UAHJsDdHXuotZYwkJSGQl1JM+ivXaqY+XBDDL4TiA==", "requires": { "abab": "^2.0.5", "acorn": "^8.0.5", @@ -6478,9 +6478,9 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "pupa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", - "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", "requires": { "escape-goat": "^2.0.0" } @@ -8113,9 +8113,9 @@ "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" }, "webpack": { - "version": "5.24.4", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.24.4.tgz", - "integrity": "sha512-RXOdxF9hFFFhg47BryCgyFrEyyu7Y/75/uiI2DoUiTMqysK+WczVSTppvkR47oZcmI/DPaXCiCiaXBP8QjkNpA==", + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.25.0.tgz", + "integrity": "sha512-jqQZopNCzt9c4K6Qa7j6kIhzHfR9wgF84go58VoNp4JbZrBr2D2l5lcv72CW80yc6NJl8CR6OY8xctnIs0r2uw==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.0", diff --git a/package.json b/package.json index dc9f22a68..02f2f9da4 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "dayjs": "1.10.4", "ejs": "3.1.6", "electron-debug": "3.2.0", - "electron-dl": "3.2.0", + "electron-dl": "3.2.1", "electron-find": "1.0.6", "electron-window-state": "5.0.3", "express": "4.17.1", @@ -49,9 +49,9 @@ "image-type": "4.1.0", "ini": "2.0.0", "is-animated": "^2.0.1", - "is-svg": "4.2.1", + "is-svg": "4.2.2", "jimp": "0.16.1", - "jsdom": "16.5.0", + "jsdom": "16.5.1", "mime-types": "2.1.29", "multer": "1.4.2", "node-abi": "2.21.0", @@ -78,7 +78,7 @@ }, "devDependencies": { "cross-env": "7.0.3", - "electron": "12.0.0", + "electron": "12.0.1", "electron-builder": "22.10.5", "electron-packager": "15.2.0", "electron-rebuild": "2.3.5", @@ -87,7 +87,7 @@ "jsdoc": "3.6.6", "lorem-ipsum": "2.0.3", "rcedit": "3.0.0", - "webpack": "5.24.4", + "webpack": "5.25.0", "webpack-cli": "4.5.0" }, "optionalDependencies": {