summaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorDaniel GarcĂ­a <[email protected]>2024-01-27 02:43:26 +0100
committerGitHub <[email protected]>2024-01-27 02:43:26 +0100
commitedf7484a70942de387d59c5d5cf849f24180ba66 (patch)
treeb5cd3c96048e8bd77c895a099f9fbca147ac244e /migrations
parent8b66e3441571fdb71f0610882d1ee47dccc8c0a3 (diff)
downloadvaultwarden-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')
-rw-r--r--migrations/mysql/2024-01-12-210182_change_attachment_size/down.sql0
-rw-r--r--migrations/mysql/2024-01-12-210182_change_attachment_size/up.sql1
-rw-r--r--migrations/postgresql/2024-01-12-210182_change_attachment_size/down.sql0
-rw-r--r--migrations/postgresql/2024-01-12-210182_change_attachment_size/up.sql3
-rw-r--r--migrations/sqlite/2024-01-12-210182_change_attachment_size/down.sql0
-rw-r--r--migrations/sqlite/2024-01-12-210182_change_attachment_size/up.sql1
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