hasTable('gpoddersync_episode_action')) { $table = $schema->createTable('gpoddersync_episode_action'); $table->addColumn('id', 'integer', [ 'autoincrement' => true, 'notnull' => true, ]); $table->addColumn('podcast', 'string', [ 'notnull' => true, 'length' => 500 ]); $table->addColumn('episode', 'string', [ 'notnull' => true, 'length' => 500, 'unique' => true, ]); $table->addColumn('action', 'string', [ 'notnull' => true, 'length' => 5 ]); $table->addColumn('position', 'integer', [ 'notnull' => true, ]); $table->addColumn('started', Types::INTEGER, [ 'notnull' => true, ]); $table->addColumn('total', Types::INTEGER, [ 'notnull' => true, ]); $table->addColumn('timestamp', Types::DATETIME_MUTABLE, [ 'notnull' => true, ]); $table->addColumn('user_id', Types::STRING, [ 'notnull' => true, 'length' => 200, ]); $table->setPrimaryKey(['id']); $table->addUniqueIndex(['episode', 'user_id'], 'gpoddersync_episode_user_id'); } return $schema; } }