ToolJet/server/data-migrations/1747338135635-BackfillSlackAppOption.ts
Ganesh Kumar 0eb2440023
Release: Marketplace sprint 12 (#13207)
* Feature: Prometheus plugin (#13161)

* prometheus plugin

* added existing props

* Host and database can be dynamically configured in query builder for PostgreSQL and MySQL data sources (#13163)

* Fix: Postgresql datasource tries to connect via ssl even when ssl toggle is off (#13167)

* The ability to provide a partition key for deleting items in CosmosDB datasource has been enabled (#13166)

* Feature: Ability to configure the database name in Redis datasource (#13165)

* Fix: Avoid setting Content-Type header for requests without body and configure different host for all environments in OpenAPI [PRE-RELEASE] (#13230)

* Send content-type only with body in request

* Persist OpenAPI parameters per operation only

* Configure different host

* Add disable styles to the select input

* Feat: New fields 'client id' and 'client secret' have been introduced in the Slack datasource configuration page in pre-release (#13162)

* Update slack frontend

* Update slack backend to handle custom creds

* Add backfill migrations

* Dynamically change dropdown according to versions

* Change migration file name

* Correctly access scope in chat:write logic

---------

Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
Co-authored-by: Parth <108089718+parthy007@users.noreply.github.com>
Co-authored-by: Akshay <akshaysasidrn@gmail.com>
2025-07-11 12:15:39 +05:30

13 lines
555 B
TypeScript

import { MigrationInterface, QueryRunner } from 'typeorm';
export class BackfillSlackAppOption1747338135635 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
UPDATE data_source_options
SET "options" = ("options"::jsonb || '{"credential_source": {"value": "from_env", "encrypted": false}}'::jsonb)::json
FROM data_sources ds
WHERE ds.id = data_source_id and ds.kind = 'slack'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {}
}