diff options
author | Daniel GarcĂa <[email protected]> | 2024-01-27 02:43:26 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-27 02:43:26 +0100 |
commit | edf7484a70942de387d59c5d5cf849f24180ba66 (patch) | |
tree | b5cd3c96048e8bd77c895a099f9fbca147ac244e /migrations | |
parent | 8b66e3441571fdb71f0610882d1ee47dccc8c0a3 (diff) | |
download | vaultwarden-edf7484a70942de387d59c5d5cf849f24180ba66.tar.gz vaultwarden-edf7484a70942de387d59c5d5cf849f24180ba66.zip |
Improve file limit handling (#4242)
* Improve file limit handling
* Oops
* Update PostgreSQL migration
* Review comments
---------
Co-authored-by: BlackDex <[email protected]>
Diffstat (limited to 'migrations')
6 files changed, 5 insertions, 0 deletions
diff --git a/migrations/mysql/2024-01-12-210182_change_attachment_size/down.sql b/migrations/mysql/2024-01-12-210182_change_attachment_size/down.sql new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/migrations/mysql/2024-01-12-210182_change_attachment_size/down.sql diff --git a/migrations/mysql/2024-01-12-210182_change_attachment_size/up.sql b/migrations/mysql/2024-01-12-210182_change_attachment_size/up.sql new file mode 100644 index 00000000..4ad2741c --- /dev/null +++ b/migrations/mysql/2024-01-12-210182_change_attachment_size/up.sql @@ -0,0 +1 @@ +ALTER TABLE attachments MODIFY file_size BIGINT NOT NULL; diff --git a/migrations/postgresql/2024-01-12-210182_change_attachment_size/down.sql b/migrations/postgresql/2024-01-12-210182_change_attachment_size/down.sql new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/migrations/postgresql/2024-01-12-210182_change_attachment_size/down.sql diff --git a/migrations/postgresql/2024-01-12-210182_change_attachment_size/up.sql b/migrations/postgresql/2024-01-12-210182_change_attachment_size/up.sql new file mode 100644 index 00000000..fcd7189c --- /dev/null +++ b/migrations/postgresql/2024-01-12-210182_change_attachment_size/up.sql @@ -0,0 +1,3 @@ +ALTER TABLE attachments +ALTER COLUMN file_size TYPE BIGINT, +ALTER COLUMN file_size SET NOT NULL; diff --git a/migrations/sqlite/2024-01-12-210182_change_attachment_size/down.sql b/migrations/sqlite/2024-01-12-210182_change_attachment_size/down.sql new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/migrations/sqlite/2024-01-12-210182_change_attachment_size/down.sql diff --git a/migrations/sqlite/2024-01-12-210182_change_attachment_size/up.sql b/migrations/sqlite/2024-01-12-210182_change_attachment_size/up.sql new file mode 100644 index 00000000..187a614e --- /dev/null +++ b/migrations/sqlite/2024-01-12-210182_change_attachment_size/up.sql @@ -0,0 +1 @@ +-- Integer size in SQLite is already i64, so we don't need to do anything |