async function ensureSchema()

in server/index.js [71:86]


async function ensureSchema(pool) {
  const hasTable = await pool.schema.hasTable('stackEvent');
  if (!hasTable) {
      return pool.schema.createTable('stackEvent', table => {
      table.increments('id').primary();
      table.timestamps(true, true);
      table.string('stackId').notNullable();
      table.string('name').notNullable();
      table.string('status').notNullable();
      table.string('initiator').notNullable();
      table.string('project').notNullable();
      table.string('gcpUserAccount');
      });
  }
  console.info("Ensured that table 'stackEvent' exists");
}