@sphereon/ssi-sdk.data-store
Version:
45 lines • 2.14 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateMachineStateStore1708797018115 = void 0;
class CreateMachineStateStore1708797018115 {
constructor() {
this.name = 'CreateMachineStateStore1708797018115';
}
up(queryRunner) {
return __awaiter(this, void 0, void 0, function* () {
yield queryRunner.query(`
CREATE TABLE "MachineStateInfoEntity" (
"instance_id" text NOT NULL,
"session_id" text,
"latest_state_name" text,
"machine_name" text NOT NULL,
"latest_event_type" text NOT NULL,
"state" text NOT NULL,
"created_at" TIMESTAMP NOT NULL DEFAULT now(),
"updated_at" TIMESTAMP NOT NULL DEFAULT now(),
"updated_count" integer NOT NULL DEFAULT 0,
"expires_at" TIMESTAMP,
"completed_at" TIMESTAMP,
"tenant_id" text,
CONSTRAINT "PK_MachineStateInfoEntity_id" PRIMARY KEY ("instance_id")
)
`);
});
}
down(queryRunner) {
return __awaiter(this, void 0, void 0, function* () {
yield queryRunner.query(`DROP TABLE "MachineStateInfoEntity"`);
});
}
}
exports.CreateMachineStateStore1708797018115 = CreateMachineStateStore1708797018115;
//# sourceMappingURL=1708797018115-CreateMachineStateStore.js.map