/*
 * Cloud resources are re-keyed from per-service.name to per cloud
 * *environment* (cloud.platform + cloud.account.id + cloud.region). The old
 * per-service rows no longer match the new composite resourceIdentifier and
 * would linger as stale entries, so clear CloudResource and its child rows.
 * Discovery recreates environment-level rows from live telemetry on the next
 * ingest. Project-level rule tables are intentionally left untouched.
 */
export class RecastCloudResourcesByEnvironment1780987192743 {
    constructor() {
        this.name = "RecastCloudResourcesByEnvironment1780987192743";
    }
    async up(queryRunner) {
        await queryRunner.query(`DELETE FROM "CloudResourceInstance"`);
        await queryRunner.query(`DELETE FROM "CloudResourceLabel"`);
        await queryRunner.query(`DELETE FROM "CloudResourceOwnerUser"`);
        await queryRunner.query(`DELETE FROM "CloudResourceOwnerTeam"`);
        await queryRunner.query(`DELETE FROM "CloudResource"`);
    }
    async down() {
        /*
         * Irreversible data cleanup — environment-level rows re-discover from
         * live telemetry, so there is nothing to restore on down().
         */
    }
}
//# sourceMappingURL=1780987192743-RecastCloudResourcesByEnvironment.js.map