| 1 | CREATE TABLE "repository_log_entry" ( |
| 2 | "repository_id" text NOT NULL |
| 3 | "ulid" text NOT NULL |
| 4 | "size" bigint NOT NULL |
| 5 | "created_at" timestamp with time zone DEFAULT |
| 6 | CONSTRAINT "repository_log_entry_repository_id_ulid_pk" PRIMARY KEY |
| 7 | ); |
| 8 | --> statement-breakpoint |
| 9 | CREATE TABLE "storage_limit" ( |
| 10 | "id" text PRIMARY KEY |
| 11 | "user_id" text, |
| 12 | "organization_id" text, |
| 13 | "repository_bytes" bigint, |
| 14 | "fork_bytes" bigint, |
| 15 | "lfs_bytes" bigint, |
| 16 | "updated_at" timestamp with time zone DEFAULT |
| 17 | CONSTRAINT "storage_limit_userId_unique" UNIQUE |
| 18 | CONSTRAINT "storage_limit_organizationId_unique" UNIQUE |
| 19 | CONSTRAINT "storage_limit_owner" CHECK |
| 20 | ); |
| 21 | --> statement-breakpoint |
| 22 | ALTER TABLE "repository_log_entry" ADD |
| 23 | ALTER TABLE "storage_limit" ADD |
| 24 | ALTER TABLE "storage_limit" ADD |