aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/guff/migrations.cr3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/guff/migrations.cr b/src/guff/migrations.cr
index c72edde..c32e671 100644
--- a/src/guff/migrations.cr
+++ b/src/guff/migrations.cr
@@ -139,7 +139,8 @@ module Guff
updated_at TIMESTAMP WITH TIME ZONE
NOT NULL DEFAULT CURRENT_TIMESTAMP,
- data TEXT NOT NULL DEFAULT ''
+ data TEXT NOT NULL DEFAULT '{}'
+ CHECK (LENGTH(data) > 2)
)
}, %{
CREATE INDEX in_sessions_sid on sessions(session_id)