Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
985a2c3
feat: setup lite-interactive version with chat messages
sgfost Jul 17, 2025
2b721af
feat: configurable game type per study
sgfost Jul 17, 2025
a9d134e
feat: lite game voting schema
sgfost Jul 22, 2025
96a7b10
feat: lite event card voting game server logic
sgfost Jul 23, 2025
2a1f90d
refactor: split up litegame voting logic
sgfost Aug 1, 2025
5ffef97
feat: separate interactive study tables/service/routing
sgfost Aug 8, 2025
d0a9ccd
feat: lite interactive (simplified pom) game dashboard
sgfost Aug 13, 2025
6592e48
feat: add life as usual variation treatments for litegame
sgfost Aug 13, 2025
8325cf1
feat: add remaining cards event cards for prolificInteractive
sgfost Aug 13, 2025
d378c43
fix: hero or pariah voting and interactive layout adjustment
sgfost Aug 13, 2025
2f2f3a2
feat: add audit and sandstorm events to lite interactive game
sgfost Aug 13, 2025
ec0098e
fix: litegame export should only scale SH for certain game types
sgfost Aug 14, 2025
63dee31
chore: squash prolific interactive mode migrations
sgfost Aug 14, 2025
438e066
fix: disable enter to invest in interactive game, conflicts w chat
sgfost Aug 15, 2025
ffa7564
feat: add better phase indicators to lite interactive game
sgfost Aug 22, 2025
f373fc7
feat: corral study participants
sgfost Sep 8, 2025
5005942
feat: interactive game instructions and 'priming' treatments
sgfost Sep 30, 2025
87ec0ba
feat: lite interactive system health report
sgfost Oct 2, 2025
7b3093b
feat: lite interactive vote outcomes, round events, and more
sgfost Oct 20, 2025
f4ed25d
feat: lite game variable card timers and time extension
sgfost Oct 27, 2025
5019c4d
feat: lite game export includes voting and chat
sgfost Oct 28, 2025
4a1794a
feat: extend first round invest time for lite interactive game by 2x
sgfost Nov 6, 2025
945d4ae
fix: nevermind, extend timer for every round in lite prolific
sgfost Nov 6, 2025
8cde1c1
fix: lite interactive compulsive philanthropy problems
sgfost Nov 7, 2025
2cfaf97
chore: update client/server deps
sgfost Nov 7, 2025
34eaa2a
fix: resolve typeorm breaking change
sgfost Nov 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: squash prolific interactive mode migrations
  • Loading branch information
sgfost committed Aug 14, 2025
commit 63dee31be15535fc0ec9ae377e6f8a4bc2a90a28
35 changes: 0 additions & 35 deletions server/src/migration/1752794083755-AddLiteProlificInteractive.ts

This file was deleted.

69 changes: 0 additions & 69 deletions server/src/migration/1753297901376-AddLiteGameVoting.ts

This file was deleted.

37 changes: 0 additions & 37 deletions server/src/migration/1754685546418-AddProlificInteractiveStudy.ts

This file was deleted.

This file was deleted.

60 changes: 60 additions & 0 deletions server/src/migration/1755194163286-AddLiteProlificInteractive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { MigrationInterface, QueryRunner } from "typeorm";

export class AddLiteProlificInteractive1755194163286 implements MigrationInterface {
name = 'AddLiteProlificInteractive1755194163286'

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "lite_player_vote" DROP CONSTRAINT "FK_9e944118f965706744fe4b71227"`);
await queryRunner.query(`CREATE TABLE "lite_player_vote_effect" ("id" SERIAL NOT NULL, "dateCreated" TIMESTAMP NOT NULL DEFAULT now(), "deckCardId" integer NOT NULL, "playerId" integer NOT NULL, "pointsChange" integer NOT NULL DEFAULT '0', "resourcesChange" integer NOT NULL DEFAULT '0', "systemHealthChange" integer NOT NULL DEFAULT '0', CONSTRAINT "PK_8981d8cf8e1e34165319fbe471f" PRIMARY KEY ("id"))`);
await queryRunner.query(`CREATE TABLE "lite_chat_message" ("id" SERIAL NOT NULL, "dateCreated" TIMESTAMP NOT NULL, "playerId" integer NOT NULL, "message" character varying NOT NULL, "gameId" integer NOT NULL, "round" integer NOT NULL, CONSTRAINT "PK_f31675cb7a773d75f5100660ff5" PRIMARY KEY ("id"))`);
await queryRunner.query(`CREATE TABLE "prolific_interactive_study_participant" ("id" SERIAL NOT NULL, "userId" integer NOT NULL, "prolificId" character varying NOT NULL, "studyId" integer NOT NULL, "roomId" character varying NOT NULL DEFAULT '', "abandonedGame" boolean NOT NULL DEFAULT false, "interactivePlayerId" integer, CONSTRAINT "REL_2bce3bd6bdf9dccb3d55c7b1dd" UNIQUE ("userId"), CONSTRAINT "REL_1f838a9be6b8563c057ff9fcac" UNIQUE ("interactivePlayerId"), CONSTRAINT "PK_9d3edd4a44720d81d93cbe75abe" PRIMARY KEY ("id"))`);
await queryRunner.query(`CREATE TABLE "prolific_interactive_study" ("id" SERIAL NOT NULL, "isActive" boolean NOT NULL DEFAULT true, "description" character varying, "externalSurveyUrl" character varying, "studyId" character varying NOT NULL, "completionCode" character varying NOT NULL, "gameType" character varying NOT NULL DEFAULT 'prolificInteractive', CONSTRAINT "PK_59b4deb56893f1d71f77c171eef" PRIMARY KEY ("id"))`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" DROP COLUMN "roundId"`);
await queryRunner.query(`ALTER TABLE "lite_game_treatment" ADD "numLifeAsUsualCardsOverride" integer`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ADD "dateCreated" TIMESTAMP NOT NULL DEFAULT now()`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ADD "isDefaultTimeoutVote" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ADD "binaryVoteInterpretation" character varying`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ADD "voteStep" integer NOT NULL DEFAULT '1'`);
await queryRunner.query(`ALTER TABLE "prolific_solo_study" ADD "gameType" character varying NOT NULL DEFAULT 'prolificBaseline'`);
await queryRunner.query(`ALTER TABLE "prolific_multiplayer_study" ADD "gameType" character varying NOT NULL DEFAULT 'prolificBaseline'`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ALTER COLUMN "binaryVote" DROP NOT NULL`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" DROP COLUMN "roleVote"`);
await queryRunner.query(`DROP TYPE "public"."lite_player_vote_rolevote_enum"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ADD "roleVote" character varying`);
await queryRunner.query(`ALTER TABLE "lite_player_vote_effect" ADD CONSTRAINT "FK_b6e645acf6d4057fad37272be97" FOREIGN KEY ("deckCardId") REFERENCES "lite_mars_event_deck_card"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "lite_player_vote_effect" ADD CONSTRAINT "FK_edf9c978e90e6996c2d7c772f12" FOREIGN KEY ("playerId") REFERENCES "lite_player"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "lite_chat_message" ADD CONSTRAINT "FK_3e57003d074eb2cf18f58011601" FOREIGN KEY ("playerId") REFERENCES "lite_player"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "lite_chat_message" ADD CONSTRAINT "FK_a02ac0d70aa61c4e322385b6e55" FOREIGN KEY ("gameId") REFERENCES "lite_game"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "prolific_interactive_study_participant" ADD CONSTRAINT "FK_2bce3bd6bdf9dccb3d55c7b1dd3" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "prolific_interactive_study_participant" ADD CONSTRAINT "FK_37c35dd2760cf3f06f36be2e0cc" FOREIGN KEY ("studyId") REFERENCES "prolific_interactive_study"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "prolific_interactive_study_participant" ADD CONSTRAINT "FK_1f838a9be6b8563c057ff9fcace" FOREIGN KEY ("interactivePlayerId") REFERENCES "lite_player"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "prolific_interactive_study_participant" DROP CONSTRAINT "FK_1f838a9be6b8563c057ff9fcace"`);
await queryRunner.query(`ALTER TABLE "prolific_interactive_study_participant" DROP CONSTRAINT "FK_37c35dd2760cf3f06f36be2e0cc"`);
await queryRunner.query(`ALTER TABLE "prolific_interactive_study_participant" DROP CONSTRAINT "FK_2bce3bd6bdf9dccb3d55c7b1dd3"`);
await queryRunner.query(`ALTER TABLE "lite_chat_message" DROP CONSTRAINT "FK_a02ac0d70aa61c4e322385b6e55"`);
await queryRunner.query(`ALTER TABLE "lite_chat_message" DROP CONSTRAINT "FK_3e57003d074eb2cf18f58011601"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote_effect" DROP CONSTRAINT "FK_edf9c978e90e6996c2d7c772f12"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote_effect" DROP CONSTRAINT "FK_b6e645acf6d4057fad37272be97"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" DROP COLUMN "roleVote"`);
await queryRunner.query(`CREATE TYPE "public"."lite_player_vote_rolevote_enum" AS ENUM('Curator', 'Entrepreneur', 'Pioneer', 'Politician', 'Researcher')`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ADD "roleVote" "public"."lite_player_vote_rolevote_enum" NOT NULL`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ALTER COLUMN "binaryVote" SET NOT NULL`);
await queryRunner.query(`ALTER TABLE "prolific_multiplayer_study" DROP COLUMN "gameType"`);
await queryRunner.query(`ALTER TABLE "prolific_solo_study" DROP COLUMN "gameType"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" DROP COLUMN "voteStep"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" DROP COLUMN "binaryVoteInterpretation"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" DROP COLUMN "isDefaultTimeoutVote"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" DROP COLUMN "dateCreated"`);
await queryRunner.query(`ALTER TABLE "lite_game_treatment" DROP COLUMN "numLifeAsUsualCardsOverride"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ADD "roundId" integer NOT NULL`);
await queryRunner.query(`DROP TABLE "prolific_interactive_study"`);
await queryRunner.query(`DROP TABLE "prolific_interactive_study_participant"`);
await queryRunner.query(`DROP TABLE "lite_chat_message"`);
await queryRunner.query(`DROP TABLE "lite_player_vote_effect"`);
await queryRunner.query(`ALTER TABLE "lite_player_vote" ADD CONSTRAINT "FK_9e944118f965706744fe4b71227" FOREIGN KEY ("roundId") REFERENCES "lite_game_round"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
}

}
Loading