mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat: Enforce data-stores limits (no-changelog) (#19116)
Co-authored-by: Charlie Kolb <charlie@n8n.io>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { DATA_STORE_COLUMN_REGEX, type DataStoreCreateColumnSchema } from '@n8n/api-types';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { DslColumn } from '@n8n/db';
|
||||
import { Container } from '@n8n/di';
|
||||
import type { DataSourceOptions } from '@n8n/typeorm';
|
||||
import type { DataStoreColumnJsType, DataStoreRowReturn, DataStoreRowsReturn } from 'n8n-workflow';
|
||||
import { UnexpectedError } from 'n8n-workflow';
|
||||
@@ -286,3 +288,8 @@ export function escapeLikeSpecials(input: string): string {
|
||||
.replace(/\\/g, '\\\\') // escape the escape char itself
|
||||
.replace(/_/g, '\\_'); // make '_' literal ('%' stays a wildcard)
|
||||
}
|
||||
|
||||
export function toTableName(dataStoreId: string): DataStoreUserTableName {
|
||||
const { tablePrefix } = Container.get(GlobalConfig).database;
|
||||
return `${tablePrefix}data_table_user_${dataStoreId}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user