The importer sends its RSA public key (POST /importer/hello); the console looks IMVU accounts up, confirms them in a dialog, and seals each password in the browser for that key. The hub keeps only the sealed copy, until the importer confirms it has it. Accounts are tried in order; settings (rate, jobs at once) come from the console too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
27 lines
1.7 KiB
SQL
27 lines
1.7 KiB
SQL
CREATE TABLE "importer_account" (
|
|
"id" text PRIMARY KEY NOT NULL,
|
|
"catalog_id" text NOT NULL,
|
|
"imvu_id" bigint NOT NULL,
|
|
"username" text NOT NULL,
|
|
"position" integer NOT NULL,
|
|
"sealed" text,
|
|
"sealed_for" text,
|
|
"sealed_at" timestamp with time zone,
|
|
"state" text DEFAULT 'waiting' NOT NULL,
|
|
"state_message" text DEFAULT '' NOT NULL,
|
|
"state_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
"access_pass" boolean DEFAULT false NOT NULL,
|
|
"age_verified" boolean DEFAULT false NOT NULL,
|
|
"added_by" text,
|
|
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "catalog" ADD COLUMN "importer_public_key" text;--> statement-breakpoint
|
|
ALTER TABLE "catalog" ADD COLUMN "importer_fingerprint" text;--> statement-breakpoint
|
|
ALTER TABLE "catalog" ADD COLUMN "importer_version" text DEFAULT '' NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "catalog" ADD COLUMN "importer_seen_at" timestamp with time zone;--> statement-breakpoint
|
|
ALTER TABLE "catalog" ADD COLUMN "importer_settings" jsonb DEFAULT '{"rate":2,"concurrency":2}'::jsonb NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "importer_account" ADD CONSTRAINT "importer_account_catalog_id_catalog_id_fk" FOREIGN KEY ("catalog_id") REFERENCES "public"."catalog"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
ALTER TABLE "importer_account" ADD CONSTRAINT "importer_account_added_by_user_id_fk" FOREIGN KEY ("added_by") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
CREATE UNIQUE INDEX "importer_account_imvu" ON "importer_account" USING btree ("catalog_id","imvu_id"); |