mirror of
https://github.com/versia-pub/server.git
synced 2026-04-28 13:19:16 +02:00
refactor: ♻️ Rewrite build system to fit the monorepo architecture
This commit is contained in:
parent
7de4b573e3
commit
90b6399407
217 changed files with 2143 additions and 1858 deletions
40
packages/kit/tables/migrations/0005_sleepy_puma.sql
Normal file
40
packages/kit/tables/migrations/0005_sleepy_puma.sql
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
ALTER TABLE "Instance" RENAME COLUMN "disableAutomoderation" TO "disable_automoderation";--> statement-breakpoint
|
||||
ALTER TABLE "Relationship" RENAME COLUMN "showingReblogs" TO "showing_reblogs";--> statement-breakpoint
|
||||
ALTER TABLE "Relationship" RENAME COLUMN "followedBy" TO "followed_by";--> statement-breakpoint
|
||||
ALTER TABLE "Relationship" RENAME COLUMN "blockedBy" TO "blocked_by";--> statement-breakpoint
|
||||
ALTER TABLE "Relationship" RENAME COLUMN "mutingNotifications" TO "muting_notifications";--> statement-breakpoint
|
||||
ALTER TABLE "Relationship" RENAME COLUMN "domainBlocking" TO "domain_blocking";--> statement-breakpoint
|
||||
ALTER TABLE "Relationship" RENAME COLUMN "createdAt" TO "created_at";--> statement-breakpoint
|
||||
ALTER TABLE "Relationship" RENAME COLUMN "updatedAt" TO "updated_at";--> statement-breakpoint
|
||||
ALTER TABLE "Status" RENAME COLUMN "contentType" TO "content_type";--> statement-breakpoint
|
||||
ALTER TABLE "Status" RENAME COLUMN "spoilerText" TO "spoiler_text";--> statement-breakpoint
|
||||
ALTER TABLE "Status" RENAME COLUMN "contentSource" TO "content_source";--> statement-breakpoint
|
||||
ALTER TABLE "Status" DROP CONSTRAINT "Status_reblogId_fkey";
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "Status" DROP CONSTRAINT "Status_inReplyToPostId_fkey";
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "Status" DROP CONSTRAINT "Status_quotingPostId_fkey";
|
||||
--> statement-breakpoint
|
||||
DROP INDEX IF EXISTS "Application_client_id_key";--> statement-breakpoint
|
||||
DROP INDEX IF EXISTS "Status_uri_key";--> statement-breakpoint
|
||||
ALTER TABLE "Relationship" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
|
||||
ALTER TABLE "Status" ALTER COLUMN "updatedAt" SET DEFAULT now();--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "Application_client_id_index" ON "Application" ("client_id");--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "Status_uri_index" ON "Status" ("uri");--> statement-breakpoint
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "Status" ADD CONSTRAINT "Status_reblogId_Status_id_fk" FOREIGN KEY ("reblogId") REFERENCES "Status"("id") ON DELETE cascade ON UPDATE cascade;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
--> statement-breakpoint
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "Status" ADD CONSTRAINT "Status_inReplyToPostId_Status_id_fk" FOREIGN KEY ("inReplyToPostId") REFERENCES "Status"("id") ON DELETE set null ON UPDATE cascade;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
--> statement-breakpoint
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "Status" ADD CONSTRAINT "Status_quotingPostId_Status_id_fk" FOREIGN KEY ("quotingPostId") REFERENCES "Status"("id") ON DELETE set null ON UPDATE cascade;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
Loading…
Add table
Add a link
Reference in a new issue