var server = plugins.maintenance.getServer("example_data");
if (server)
{
var table = server.createNewTable("new_table");
if (table) {
var pk = table.createNewColumn("new_table_id", JSColumn.INTEGER, 0);
pk.rowIdentifierType = JSColumn.PK_COLUMN;
if (server.synchronizeWithDB(table))
application.output("New table created in the database.");
else
application.output("New table not created in database.");
}
else application.output("New table not created at all.");
} |