hasTable('ex_apps_routes')) { $table = $schema->createTable('ex_apps_routes'); $table->addColumn('id', 'integer', [ 'autoincrement' => true, 'notnull' => true, ]); $table->addColumn('appid', 'string', [ 'notnull' => true, 'length' => 32, ]); // regex route on the ExApp side that is being called from F7cloud, // or other origins (in case of public routes) $table->addColumn('url', 'string', [ 'notnull' => true, 'length' => 512, ]); $table->addColumn('verb', 'string', [ 'notnull' => true, 'length' => 64, ]); $table->addColumn('access_level', 'integer', [ 'notnull' => true, 'default' => 0, // 0 = user, 1 = admin, 2 = public ]); $table->addColumn('headers_to_exclude', 'string', [ 'notnull' => false, 'length' => 512, ]); $table->setPrimaryKey(['id']); $table->addIndex(['appid'], 'ex_apps_routes_appid'); } return $schema; } }