PromucFlow_constructor/app/util/plugin-generation/plop-templates/database-changelog.hbs
Shrikant Sharat Kandula 6accb9e364
fix: Use CDN for all assets (#10417)
Co-authored-by: Nayan <nayan@appsmith.com>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2022-01-26 02:19:43 +05:30

21 lines
940 B
Handlebars

@ChangeSet(order = "1000", id = "add-{{pascalCase name}}-plugin", author = "")
public void add{{pascalCase name}}Plugin(MongockTemplate mongoTemplate) {
Plugin plugin = new Plugin();
plugin.setName("{{pascalCase name}}");
plugin.setType(PluginType.DB);
plugin.setPackageName("{{dashCase name}}");
plugin.setUiComponent("DbEditorForm");
plugin.setDatasourceComponent("AutoForm");
plugin.setResponseType(Plugin.ResponseType.TABLE);
plugin.setIconLocation("https://assets.appsmith.com/{{pascalCase name}}.png");
plugin.setDocumentationLink("https://docs.appsmith.com/datasource-reference/querying-{{dashCase name}}");
plugin.setDefaultInstall(false);
try {
mongoTemplate.insert(plugin);
} catch (DuplicateKeyException e) {
log.warn(plugin.getPackageName() + " already present in database.");
}
}
}