summaryrefslogtreecommitdiff
path: root/internal/server/api/migrations/20250109134844_users.sql
blob: 8ebb9eb8ab957cfdca17e4c4c430dd9be0ec47f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-- +goose Up
CREATE TABLE IF NOT EXISTS users (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  public_key BLOB NOT NULL UNIQUE,
  description TEXT NOT NULL DEFAULT '',
  is_public_dm BOOLEAN NOT NULL CHECK (is_public_dm IN (false, true)) DEFAULT true,
  is_deleted BOOLEAN NOT NULL CHECK (is_deleted IN (false, true)) DEFAULT false
);

-- +goose Down
DROP TABLE IF EXISTS users;