mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
refactor(database): Remove unused columns and rename baseUrl to domain
This commit is contained in:
parent
35d285bb2a
commit
df2a5ce260
16 changed files with 2448 additions and 59 deletions
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE "Instances" RENAME COLUMN "base_url" TO "domain";--> statement-breakpoint
|
||||
ALTER TABLE "Reaction" DROP CONSTRAINT "Reaction_uri_unique";--> statement-breakpoint
|
||||
ALTER TABLE "Reaction" DROP COLUMN "uri";
|
||||
2382
packages/kit/tables/migrations/meta/0055_snapshot.json
Normal file
2382
packages/kit/tables/migrations/meta/0055_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -386,6 +386,13 @@
|
|||
"when": 1771983340896,
|
||||
"tag": "0054_good_madelyne_pryor",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 55,
|
||||
"version": "7",
|
||||
"when": 1775213166172,
|
||||
"tag": "0055_yielding_harry_osborn",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ const updatedAt = () =>
|
|||
.defaultNow()
|
||||
.notNull();
|
||||
|
||||
const uri = () => text("uri").unique();
|
||||
|
||||
const id = () => uuid("id").primaryKey();
|
||||
|
||||
export const Challenges = pgTable("Challenges", {
|
||||
|
|
@ -136,7 +134,6 @@ export const PushSubscriptionsRelations = relations(
|
|||
|
||||
export const Reactions = pgTable("Reaction", {
|
||||
id: id(),
|
||||
uri: uri(),
|
||||
remoteId: text("remote_id"),
|
||||
// Emoji ID is nullable, in which case it is a text emoji, and the emojiText field is used
|
||||
emojiId: uuid("emojiId").references(() => Emojis.id, {
|
||||
|
|
@ -560,7 +557,7 @@ export const NotesRelations = relations(Notes, ({ many, one }) => ({
|
|||
|
||||
export const Instances = pgTable("Instances", {
|
||||
id: id(),
|
||||
baseUrl: text("base_url").notNull(),
|
||||
domain: text("domain").notNull(),
|
||||
name: text("name").notNull(),
|
||||
version: text("version").notNull(),
|
||||
logo: jsonb("logo").$type<typeof NonTextContentFormatSchema._input>(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue