ToolJet/server/migrations/1718529294184-AddConfigurationColumnToInternalTables.ts
Shaurya Sharma a6d2666206
Date with time data type for ToolJet Database (#10066)
* Basic wrapper around Datetime picker component

* Cell Edit Menu for Datetime Picker

* Reverted Old Changes

* Added Datetime picker for Add/Edit Row

* Added datetime picker for create/edit column

* Added datetime picker for create/edit table

* Added datetime picker for create/edit table

* Disabled PK, FK, Unique and made some fixes

* Migration script added

* Internal table configuration update changes

* Updating internal table configuration based on timezone select

* Time display pill & support for changing & retrieving timezone from the frontend added

* Time bug partially resolved

* Time bug solved

* Minor Bugs Solved

* fix : datepicker closed when we select date from outside month which is not current month's date

* Minor Design Fixes

* Css & Comment Fixes

* Removed console.logs

* Fixed app import failing

* Changed datatype name and label

* Css Fixes and added clear button

* Minor fix

* Fixed create table breaking on null values

---------

Co-authored-by: Abd-Rahman-1999 <s.rahmanabd1999@gmail.com>
2024-07-01 16:24:51 +05:30

19 lines
670 B
TypeScript

import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
export class AddConfigurationColumnToInternalTables1718529294184 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumn(
'internal_tables',
new TableColumn({
name: 'configurations',
type: 'jsonb',
isNullable: false, // Set to false to make it NOT NULL
default: '\'{"columns": {"column_names":{}, "configurations":{}}}\'',
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn('internal_tables', 'configurations');
}
}