feat: workspace sync (#3505)
* feat: wip workspace sync * feat: wip lot of debugging * feat: refactor and fix sync * fix: clean fix: clean * feat: add simple comparator tests * fix: remove debug * feat: wip drop table * fix: main merge * fix: some issues, and prepare storage system to handle complex deletion * feat: wip clean and fix * fix: reflect issue when using array instead of map and clean * fix: test & sync * fix: yarn files * fix: unecesary if-else * fix: if condition not needed * fix: remove debug * fix: replace EQUAL by SKIP * fix: sync metadata relation not applied properly * fix: lint issues * fix: merge issue
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
export function generateMigrationName(name?: string): string {
|
||||
return `${new Date().getTime()}${name ? `-${name}` : ''}`;
|
||||
}
|
||||
@ -70,7 +70,7 @@ export class WorkspaceMigrationEntity {
|
||||
@Column({ nullable: true, type: 'jsonb' })
|
||||
migrations: WorkspaceMigrationTableAction[];
|
||||
|
||||
@Column({ nullable: true })
|
||||
@Column({ nullable: false })
|
||||
name: string;
|
||||
|
||||
@Column({ default: false })
|
||||
|
||||
@ -57,10 +57,12 @@ export class WorkspaceMigrationService {
|
||||
* @param migrations
|
||||
*/
|
||||
public async createCustomMigration(
|
||||
name: string,
|
||||
workspaceId: string,
|
||||
migrations: WorkspaceMigrationTableAction[],
|
||||
) {
|
||||
await this.workspaceMigrationRepository.save({
|
||||
name,
|
||||
migrations,
|
||||
workspaceId,
|
||||
isCustom: true,
|
||||
|
||||
Reference in New Issue
Block a user