hasTable('gpodder_episode_action')) { $table = $schema->createTable('gpodder_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, ]); $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'], 'gpodder_episode_user_id'); } return $schema; } }