18 lines
913 B
MySQL
18 lines
913 B
MySQL
|
|
ALTER TABLE "club_activities" ADD COLUMN IF NOT EXISTS "scope" text DEFAULT 'nationwide' NOT NULL;
|
||
|
|
ALTER TABLE "club_activities" ADD COLUMN IF NOT EXISTS "state" text;
|
||
|
|
ALTER TABLE "club_activities" ADD COLUMN IF NOT EXISTS "city" text;
|
||
|
|
ALTER TABLE "club_activities" ADD COLUMN IF NOT EXISTS "latitude" numeric(9, 6);
|
||
|
|
ALTER TABLE "club_activities" ADD COLUMN IF NOT EXISTS "longitude" numeric(9, 6);
|
||
|
|
ALTER TABLE "club_activities" ADD COLUMN IF NOT EXISTS "locationLabel" text;
|
||
|
|
|
||
|
|
CREATE TABLE IF NOT EXISTS "club_profiles" (
|
||
|
|
"userId" text PRIMARY KEY NOT NULL,
|
||
|
|
"state" text DEFAULT 'Bayern' NOT NULL,
|
||
|
|
"city" text,
|
||
|
|
"latitude" numeric(9, 6),
|
||
|
|
"longitude" numeric(9, 6),
|
||
|
|
"privacyMode" text DEFAULT 'state' NOT NULL,
|
||
|
|
"updatedAt" timestamp DEFAULT now() NOT NULL,
|
||
|
|
CONSTRAINT "club_profiles_userId_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action
|
||
|
|
);
|