ToolJet/server/ormconfig.ts

114 lines
3 KiB
TypeScript
Raw Normal View History

2022-12-23 12:58:10 +00:00
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
import { getEnvVars } from './scripts/database-config-utils';
function dbSslConfig(envVars) {
2023-01-03 07:55:45 +00:00
let config = {};
if (envVars?.DATABASE_URL)
config = {
url: envVars.DATABASE_URL,
ssl: { rejectUnauthorized: false },
2023-01-03 07:55:45 +00:00
};
if (envVars?.CA_CERT)
config = {
...config,
...{ ssl: { rejectUnauthorized: false, ca: envVars.CA_CERT } },
2023-01-03 07:55:45 +00:00
};
return config;
}
function tooljetDbSslConfig(envVars) {
let config = {};
if (envVars?.TOOLJET_DB_URL)
config = {
url: envVars.TOOLJET_DB_URL,
ssl: { rejectUnauthorized: false },
};
if (envVars?.CA_CERT)
config = {
...config,
...{ ssl: { rejectUnauthorized: false, ca: envVars.CA_CERT } },
};
return config;
}
2023-01-03 07:55:45 +00:00
function buildConnectionOptions(data): TypeOrmModuleOptions {
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
const connectionParams = {
database: data.PG_DB,
port: +data.PG_PORT || 5432,
username: data.PG_USER,
password: data.PG_PASS,
host: data.PG_HOST,
connectTimeoutMS: 5000,
extra: {
max: 25,
},
maxQueryExecutionTime: data.SLOW_QUERY_LOGGING_THRESHOLD || (data.DISABLE_CUSTOM_QUERY_LOGGING === 'true' ? 30 : 1), // Set 1ms to log all queries by default with execution time. Set 30ms in case custom query logging is disabled
...dbSslConfig(data),
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
};
const entitiesDir =
data?.NODE_ENV === 'test' ? [__dirname + '/**/*.entity.ts'] : [__dirname + '/**/*.entity{.js,.ts}'];
return {
2022-12-23 12:58:10 +00:00
type: 'postgres',
...connectionParams,
entities: entitiesDir,
synchronize: false,
2022-12-23 12:58:10 +00:00
uuidExtension: 'pgcrypto',
migrationsRun: false,
2022-12-23 12:58:10 +00:00
migrationsTransactionMode: 'all',
logging: data.ORM_LOGGING || false,
2022-12-23 12:58:10 +00:00
migrations: [__dirname + '/migrations/**/*{.ts,.js}'],
};
}
2023-01-03 07:55:45 +00:00
function buildToolJetDbConnectionOptions(data): TypeOrmModuleOptions {
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
const connectionParams = {
database: data.TOOLJET_DB,
port: +data.TOOLJET_DB_PORT || 5432,
username: data.TOOLJET_DB_USER,
password: data.TOOLJET_DB_PASS,
host: data.TOOLJET_DB_HOST,
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
connectTimeoutMS: 5000,
logging: data.ORM_LOGGING || false,
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
extra: {
max: 25,
Feature: Aggregate and group by functionality in TJDB (#10170) * Added no codition section when aggregates are not available * Added feature to add aggregate condition and display it accordingly * Added feature to change the aggregateFx option * Added feature to update column option in the aggregate * Added feature to delete the aggregate * Disabling the group by according to valid condition but without tooltip * Added flow for deleting aggregate * feat: migration and configuration changes to support aggregation in tooljet database * added functionality for join table operations * Dropdown styles * Showing section for aggregate dropdown for joinTable operation * Added gap in multiple aggregate conditions * Added table_id in aggregate condition * Added custom placeholder Adjusted width of add condition of aggregate * Refactored logic for disable group_by field Added tooltip when group by is disabled * Updated aggregateFx to aggFx and groupBy to group_by * feat: group_by and aggregate option in list rows * added table name for aggregate dropdown value in joinTable operation * Get the group by options * value of aggregate column dropdown in join table operation * Added error and success message for aggregate deletion * Spacing adjustments * Clear the unwanted code * Updated the stucture of aggregate * Updated the structure of group_by * Fix: Query builder breaking due to undefined values * feat: logic used to aggregate on joins * Removing async * fix: app is crashing * feat: statement timeout at database level and user session level configuration can be done for ToolJet database * Added min and max width to dropdown in tooljetdb query manager * Added description * Adding width as 80 percentage when description is not avaialable * New Postgrest change for render related to Aggregate (#10175) * New Postgrest change for render related to Aggregate and group by functionality * correction in PGRST_DB_ENABLE_AGGREGATE value * Adding the env variable PGRST_DB_PRE_CONFIG * Adding the new postgrest related env changes to CE specific files * fix: updated env variable naming for aggregates * Showing description at the bottom for aggregate fx * Fixing typo error * Showing tick mark on selected item in dropdown when isMulti is false * Updated requested changes * Showing some description when option is not focused or selected * Updated the component name to AggregateFilter * fix: updated env variable to enable aggregation in tooljet database * refactor: new wrapper to create migration connection for tooljet database * fix: custom error message for aggregation errors has been handled for list_rows operation * fix: code review fixes * fix: aggregate function validation typo is updated * fix: empty validation for Select and Aggregate fields * postgrest changes for cypress * removed PGRST_DB_ENABLE_AGGREGATE --------- Co-authored-by: Ganesh Kumar <ganesh8056234@gmail.com> Co-authored-by: Adish M <44204658+adishM98@users.noreply.github.com> Co-authored-by: Adish M <adish.madhu@gmail.com>
2024-07-01 09:08:31 +00:00
statement_timeout: data.TOOLJET_DB_STATEMENT_TIMEOUT || 60000,
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
},
...tooljetDbSslConfig(data),
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
};
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
return {
2022-12-23 12:58:10 +00:00
name: 'tooljetDb',
type: 'postgres',
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
...connectionParams,
synchronize: false,
2022-12-23 12:58:10 +00:00
uuidExtension: 'pgcrypto',
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
migrationsRun: false,
2022-12-23 12:58:10 +00:00
migrationsTransactionMode: 'all',
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
logging: data.ORM_LOGGING || false,
};
}
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
function fetchConnectionOptions(type: string): TypeOrmModuleOptions {
2023-01-03 07:55:45 +00:00
const data = getEnvVars();
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
switch (type) {
2022-12-23 12:58:10 +00:00
case 'postgres':
2023-01-03 07:55:45 +00:00
return buildConnectionOptions(data);
2022-12-23 12:58:10 +00:00
case 'tooljetDb':
2023-01-03 07:55:45 +00:00
return buildToolJetDbConnectionOptions(data);
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
}
}
2022-12-23 12:58:10 +00:00
const ormconfig: TypeOrmModuleOptions = fetchConnectionOptions('postgres');
const tooljetDbOrmconfig: TypeOrmModuleOptions = fetchConnectionOptions('tooljetDb');
Feature: Tooljet Database (#4951) * wip * internal db per workspace * fix async query * feat: add storage layer route * feat: add drawer component * feat: add react-table to load data * feat: add columns form * feat: add create column form, create row form * feat: add postgrest js * add tooljet db controller to proxy requests to postgrest * util: add postgrest filter builder helper utility * feat: add filter popover * use helper utility for building query * add sortable filters * add box shadow for filter popup * use overlay trigger * use react select * add new column addition * add dropdown for table header, table list * Move filter.jsx * feat: add sort popover * feat: add postgrest js .order fn * setup tooljetdb with restricted grants for users * make db schemas added loaded dynamically on postgrest server * fix query * sign jwt token to auth user at postgrest * update db schema user with workspace * chore: add table listing * update data and columns from api * feat: add context api for sharing data * add ability to create table, view tables and add columns * use columns for sort from context api * fix ormconfig * feat: add table listing integration * feat: add create table integration * fix for rds deployment * add internal table translation instead of schema * remove tooljetdb as a datasource * wrap placeholder on proxy query * add active workspace guard * scope tooljetdb by workspace * update active workspace guard * seperate proxy related concerns to different service * make use of org id param * rename storage layer to tooljet databse * update specs * feat: Update list when new table added * feat: add create column * chore: add orgId to url + misc changes * chore: move popover to separate file * remove unused var * rename files * feat: add multiple columns * feat: add new row * removes postgrest-js from pkg lock * feat: add row data * feat: add sorting * feat: allow row deletion * feat: add search * feat: add filtering * feat: add edit mode * feat: add columns while edit table * add view table action * update setup for column constraint * fix query * integrate view_table, primary key field * render toogle for boolean data type * update view table query for primary key * fetch metadata refactor * add capability to set default values * feat: allow deletion of record based on primary key * feat: add default value while creating column * send query from sort & filter component * css changes * allow empty data * add requested changes * add err message * add common fn * allow sort + filter * remove unwanted defaults key * css changes * add more operators * dark mode fixes * add drawer footer * add loader for list tables * add dashboard design changes * design changes * add capability to drop table and delete column * add breadcrumbs * design changes * add profile * refactor tooljetdb controller * update routes * add empty page changes * delete column fix * fix delete column * design changes * fetch tables post delete * homepage changes * hide ellipsis on hover * add org settings page * add edit + create org * add notification center * fix: group permissions switch issue * add logo * remove anchor tag * fix merge conflicts * css changes * add err boundary * setup query editor * css changes * fix: merge conflicts * add menuPortal prop to filterform and sort form * fix seed * fix: build * design changes * design changes + refactor code * fix imports * fix: drawer issue on delete table * add search box changes * fix: tablename max-length 255 * fix: set newly created table as selected item * remove edit column option * added badges to enterprise only features * disable edit column * table styles * fix: popover position, placeholder default * fix: display boolean values in table * fix: tooljet database default type values * css changes * add query manager for tooljet db with create and list row * dark mode fixes * remove Header component * add ability to delete tooljetdb rows from query manager * add ability to update tooljetdb rows * dark mode fixes * css changes * display actions icon on hover * folder onclick change * add empty page styles * fix proxy requests * feat: randomize icon creation * add max items per page prop for pagination * removes unwanted position attr * add table name validation + disable submit btn while api fetch * [Bugfix] internal storage toast | trigger toasts for running preview db queries (#5019) * resolves: no toasts are fired when preview query is run for db queries * fire success toast for created and no content status text for query success * remove invalid migration * skip migration if tooljet db already created * fix: app clone icon param * fix: show confirmation box if filter options are empty in query (#5021) * for now: show native confirmation box of the brower to confirm the delete all query * typo * Revert "typo" This reverts commit b5ce5ed8890056974395750b6e07475390748e3b. * cleaned * cleaned * show confirmation box if filter options are empty in query * [Refactor/Bugfix] database query (#5028) * refactored list rows operations * remove unwanted cls * refactor create row * reafactored update rows * refactored delete rows * padding fix for tj-query * add static templates * review changes * remove unused file * Chore: tooljetdb render setup (#5033) * add postgrest for render preview deploy * pin version * add healthCheckPath * remove health check * handle database url parsing db params * add defaults for tooljetdb env * fix hostname * handle env in migration files * refactor dbconfig build * fix pg db usage * add parsed env context * add tooljetdb env * refactor db config utils Co-authored-by: gandharv <gandharvkumargarg@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Arpit <arpitnath42@gmail.com>
2022-12-22 20:39:57 +00:00
export { ormconfig, tooljetDbOrmconfig };
export default ormconfig;