Skip to content

Commit

Permalink
Merge pull request #477 from dfpc-coe/public-tiles
Browse files Browse the repository at this point in the history
Public Tile Listing
  • Loading branch information
ingalls authored Jan 17, 2025
2 parents bb17d19 + 61f7a82 commit 02faea5
Show file tree
Hide file tree
Showing 22 changed files with 4,711 additions and 3,244 deletions.
13 changes: 13 additions & 0 deletions api/lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,19 @@ export const ConnectionToken = pgTable('connection_tokens', {
updated: timestamp({ withTimezone: true, mode: 'string' }).notNull().default(sql`Now()`),
});

export const FusionType = pgTable('fusion_type', {
id: serial().primaryKey(),
name: text().notNull(),
schema: json().notNull()
});

export const ProfileFusionSource = pgTable('profile_fusion', {
id: serial().primaryKey(),
username: text().notNull().references(() => Profile.username),
fusion: integer().notNull().references(() => FusionType.id),
value: json().$type<Record<string, string>>().notNull().default({}),
});

export const ProfileInterest = pgTable('profile_interests', {
id: serial().primaryKey(),
name: text().notNull(),
Expand Down
15 changes: 15 additions & 0 deletions api/migrations/0084_clumsy_betty_brant.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE "fusion_type" (
"id" serial PRIMARY KEY NOT NULL,
"name" text NOT NULL,
"schema" json NOT NULL
);
--> statement-breakpoint
CREATE TABLE "profile_fusion" (
"id" serial PRIMARY KEY NOT NULL,
"username" text NOT NULL,
"fusion" integer NOT NULL,
"value" json DEFAULT '{}'::json NOT NULL
);
--> statement-breakpoint
ALTER TABLE "profile_fusion" ADD CONSTRAINT "profile_fusion_username_profile_username_fk" FOREIGN KEY ("username") REFERENCES "public"."profile"("username") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "profile_fusion" ADD CONSTRAINT "profile_fusion_fusion_fusion_type_id_fk" FOREIGN KEY ("fusion") REFERENCES "public"."fusion_type"("id") ON DELETE no action ON UPDATE no action;
Loading

0 comments on commit 02faea5

Please sign in to comment.