From ddd6306752186c149f8ad3bf2f59b5428cf01296 Mon Sep 17 00:00:00 2001
From: Anhgelus Morhtuuzh <william@herges.fr>
Date: Sun, 8 Mar 2026 13:38:10 +0100
Subject: feat(db): run migrations

---
 migrations/000-leave-gorm.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'migrations/000-leave-gorm.sql')

diff --git a/migrations/000-leave-gorm.sql b/migrations/000-leave-gorm.sql
index 91addd8..f80555a 100644
--- a/migrations/000-leave-gorm.sql
+++ b/migrations/000-leave-gorm.sql
@@ -1,11 +1,11 @@
-CREATE DOMAIN snowflake AS NUMERIC(20,0) CHECK (VALUE < 36893488147419103232 and CHECK VALUE > 0);
+CREATE DOMAIN snowflake AS NUMERIC(20,0) CHECK (VALUE > 0);
 CREATE DOMAIN uint AS INTEGER CHECK (VALUE >= 0);
 
 CREATE TABLE IF NOT EXISTS guilds (
     id snowflake PRIMARY KEY,
     disabled_channels TEXT,
     fallback_channel snowflake,
-    days_xp_remains INTEGER CHECK (VALUE > 0) DEFAULT 90
+    days_xp_remains INTEGER CHECK (days_xp_remains > 0) DEFAULT 90 
 );
 
 CREATE TABLE IF NOT EXISTS copaings (
@@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS copaing_xps (
     copaing_id snowflake REFERENCES copaings(id) NOT NULL,
     guild_id snowflake REFERENCES copaings(id) NOT NULL,
     xp uint DEFAULT 0,
-    created_at TIMESTAMP DEFAULT NOW,
+    created_at TIMESTAMP DEFAULT now(),
     PRIMARY KEY(copaing_id, guild_id, created_at)
 );
 
@@ -38,7 +38,7 @@ CREATE TABLE IF NOT EXISTS role_react_messages (
 
 CREATE TABLE IF NOT EXISTS role_reacts (
     role snowflake,
-    message_id snowflake REFERENCES role_react_messages(id),
+    message_id INTEGER REFERENCES role_react_messages(id),
     reaction TEXT,
     PRIMARY KEY(role, message_id, reaction)
 );
-- 
cgit v1.2.3

