mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 05:26:00 +00:00
feat: add triggers and scheduler events to sql generator
This commit is contained in:
@@ -18,6 +18,7 @@ import type {
|
||||
AlterProcessor,
|
||||
SqlObjectInfo,
|
||||
CallableObjectInfo,
|
||||
SchedulerEventInfo,
|
||||
} from 'dbgate-types';
|
||||
import _isString from 'lodash/isString';
|
||||
import _isNumber from 'lodash/isNumber';
|
||||
@@ -431,6 +432,14 @@ export class SqlDumper implements AlterProcessor {
|
||||
changeTriggerSchema(obj: TriggerInfo, newSchema: string) {}
|
||||
renameTrigger(obj: TriggerInfo, newSchema: string) {}
|
||||
|
||||
createSchedulerEvent(obj: SchedulerEventInfo) {
|
||||
this.putRaw(obj.createSql);
|
||||
this.endCommand();
|
||||
}
|
||||
dropSchedulerEvent(obj: SchedulerEventInfo, { testIfExists = false }) {
|
||||
this.putCmd('^drop ^event %f', obj);
|
||||
}
|
||||
|
||||
dropConstraintCore(cnt: ConstraintInfo) {
|
||||
this.putCmd('^alter ^table %f ^drop ^constraint %i', cnt, cnt.constraintName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user