-- Orgs

CREATE TABLE orgs (
  id         BIGINT IDENTITY (1,1) PRIMARY KEY,
  name       NVARCHAR(255)     NOT NULL,
  name_lower AS LOWER(name),
  title      NVARCHAR(255)     NOT NULL,
  created_at DATETIMEOFFSET NOT NULL DEFAULT SYSDATETIMEOFFSET()
);

CREATE UNIQUE INDEX orgs_name_uniq ON orgs (name_lower);
