mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: 🚚 Begin rebranding to Versia Server
This commit is contained in:
parent
06c65559d1
commit
c10da18182
58 changed files with 2377 additions and 242 deletions
14
drizzle/migrations/0032_ambiguous_sue_storm.sql
Normal file
14
drizzle/migrations/0032_ambiguous_sue_storm.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
ALTER TABLE "LysandObject" RENAME TO "VersiaObject";--> statement-breakpoint
|
||||
ALTER TABLE "VersiaObject" DROP CONSTRAINT "LysandObject_authorId_LysandObject_id_fk";
|
||||
--> statement-breakpoint
|
||||
DROP INDEX IF EXISTS "LysandObject_remote_id_index";--> statement-breakpoint
|
||||
DROP INDEX IF EXISTS "LysandObject_uri_index";--> statement-breakpoint
|
||||
ALTER TABLE "Instances" ALTER COLUMN "protocol" SET DEFAULT 'versia';--> statement-breakpoint
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "VersiaObject" ADD CONSTRAINT "VersiaObject_authorId_VersiaObject_id_fk" FOREIGN KEY ("authorId") REFERENCES "public"."VersiaObject"("id") ON DELETE cascade ON UPDATE cascade;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "VersiaObject_remote_id_index" ON "VersiaObject" USING btree ("remote_id");--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "VersiaObject_uri_index" ON "VersiaObject" USING btree ("uri");
|
||||
2126
drizzle/migrations/meta/0032_snapshot.json
Normal file
2126
drizzle/migrations/meta/0032_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -225,6 +225,13 @@
|
|||
"when": 1722100203904,
|
||||
"tag": "0031_mature_demogoblin",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 32,
|
||||
"version": "7",
|
||||
"when": 1724073118382,
|
||||
"tag": "0032_ambiguous_sue_storm",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,8 +136,8 @@ export const Likes = pgTable("Likes", {
|
|||
.notNull(),
|
||||
});
|
||||
|
||||
export const LysandObjects = pgTable(
|
||||
"LysandObject",
|
||||
export const VersiaObjects = pgTable(
|
||||
"VersiaObject",
|
||||
{
|
||||
id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(),
|
||||
remoteId: text("remote_id").notNull(),
|
||||
|
|
@ -154,7 +154,7 @@ export const LysandObjects = pgTable(
|
|||
return {
|
||||
remoteIdKey: uniqueIndex().on(table.remoteId),
|
||||
uriKey: uniqueIndex().on(table.uri),
|
||||
lysandObjectAuthorIdFkey: foreignKey({
|
||||
versiaObjectAuthorIdFkey: foreignKey({
|
||||
columns: [table.authorId],
|
||||
foreignColumns: [table.id],
|
||||
})
|
||||
|
|
@ -347,8 +347,8 @@ export const Instances = pgTable("Instances", {
|
|||
.notNull(),
|
||||
protocol: text("protocol")
|
||||
.notNull()
|
||||
.$type<"lysand" | "activitypub">()
|
||||
.default("lysand"),
|
||||
.$type<"versia" | "activitypub">()
|
||||
.default("versia"),
|
||||
});
|
||||
|
||||
export const OpenIdAccounts = pgTable("OpenIdAccounts", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue