Skip to main content

addTable

plugin.projectStructure.addTable(packageId: string, table: Omit<DatabaseTable, "id">, workspacePath?: string): Promise<ProjectStructureUpdateResponse>

Add a database table to a package

Parameters

ParameterTypeRequiredDescription
packageIdstringYes
tableOmit<DatabaseTable, "id">Yes
workspacePathstringNo

Returns

Promise<ProjectStructureUpdateResponse>

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.projectStructure.addTable('packageId', /* Omit<DatabaseTable, "id"> */);
console.log(result);