芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/avenida/views/db.zip
PK MqYi > migrations/20200916134817_remove_old_screenshots_migration.phpnu [ . */ use Phinx\Migration\AbstractMigration; class RemoveOldScreenshotsMigration extends AbstractMigration { /** @inheritDoc */ public function change() { // add the task $table = $this->table('task'); $table->insert([ [ 'name' => 'Remove Old Screenshots', 'class' => '\Xibo\XTR\RemoveOldScreenshotsTask', 'options' => '[]', 'schedule' => '0 0 * * * *', 'isActive' => '1', 'configFile' => '/tasks/remove-old-screenshots.task' ], ])->save(); // Add the ttl setting if (!$this->fetchRow('SELECT * FROM `setting` WHERE setting = \'DISPLAY_SCREENSHOT_TTL\'')) { $this->table('setting')->insert([ [ 'setting' => 'DISPLAY_SCREENSHOT_TTL', 'value' => 0, 'userSee' => 1, 'userChange' => 1 ] ])->save(); } } } PK MqY^ 3 migrations/20220225105237_merge_weather_widgets.phpnu [ . */ use Phinx\Migration\AbstractMigration; /** * Remove weather tiles module to merge both weather widgets into one * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace */ class MergeWeatherWidgets extends AbstractMigration { public function change() { // Delete weather tiles table $this->execute('DELETE FROM `module` WHERE module = \'weather\' '); } } PK MqYXɫ ? migrations/20180131122645_one_region_per_playlist_migration.phpnu [ table('playlist'); $playlist ->addColumn('regionId', 'integer', ['null' => true]) ->addColumn('createdDt', 'datetime', ['null' => true, 'default' => null]) ->addColumn('modifiedDt', 'datetime', ['null' => true, 'default' => null]) ->addColumn('duration', 'integer', ['default' => 0]) ->addColumn('requiresDurationUpdate', 'integer', ['default' => 0, 'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]) ->save(); $this->execute('UPDATE `playlist` SET regionId = (SELECT MAX(regionId) FROM lkregionplaylist WHERE playlist.playlistId = lkregionplaylist.playlistId);'); $this->dropTable('lkregionplaylist'); $this->execute('UPDATE `pages` SET asHome = 1 WHERE name = \'playlist\';'); $this->execute(' INSERT INTO module (Module, Name, Enabled, RegionSpecific, Description, ImageUri, SchemaVersion, ValidExtensions, PreviewEnabled, assignable, render_as, settings, viewPath, class, defaultDuration) VALUES (\'subplaylist\', \'Sub-Playlist\', 1, 1, \'Embed a Sub-Playlist\', \'forms/library.gif\', 1, null, 1, 1, \'native\', null, \'../modules\', \'Xibo\\\\Widget\\\\SubPlaylist\', 10); '); $playlistClosure = $this->table('lkplaylistplaylist', ['id' => false, 'primary_key' => ['parentId', 'childId', 'depth']]); $playlistClosure ->addColumn('parentId', 'integer') ->addColumn('childId', 'integer') ->addColumn('depth', 'integer') ->addIndex(['childId', 'parentId', 'depth'], ['unique' => true]) ->save(); $this->execute('INSERT INTO lkplaylistplaylist (parentId, childId, depth) SELECT playlistId, playlistId, 0 FROM playlist;'); } } PK MqYj > migrations/20221013103000_advertising_connectors_migration.phpnu [ . */ use Phinx\Migration\AbstractMigration; /** * Minor DB changes for 3.2.0 * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace */ class AdvertisingConnectorsMigration extends AbstractMigration { /** @inheritDoc */ public function change() { $this->table('connectors') ->insert([ [ 'className' => '\\Xibo\\Connector\\XiboSspConnector', 'isEnabled' => 0, 'isVisible' => 1 ], [ 'className' => '\\Xibo\\Connector\\XiboAudienceReportingConnector', 'isEnabled' => 0, 'isVisible' => 1 ], ]) ->save(); } } PK MqY>s\ 3 migrations/20221024082400_ad_campaign_migration.phpnu [ . */ use Phinx\Migration\AbstractMigration; /** * Ad Campaigns * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace */ class AdCampaignMigration extends AbstractMigration { /** @inheritDoc */ public function change() { // Schedule table gets some new fields. // one to set the maximum number of plays per hour // the other to indicate if the schedule is part of a parent campaign $this->table('schedule') ->addColumn('maxPlaysPerHour', 'integer', [ 'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_SMALL, 'default' => 0, ]) ->addColumn('parentCampaignId', 'integer', [ 'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, 'null' => true, 'default' => null, ]) ->save(); // More information on each campaign. $this->table('campaign') ->addColumn('type', 'string', [ 'default' => 'list', 'null' => false, 'limit' => 10 ]) ->addColumn('startDt', 'integer', [ 'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, 'null' => true, 'default' => null, ]) ->addColumn('endDt', 'integer', [ 'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, 'null' => true, 'default' => null, ]) ->addColumn('targetType', 'string', [ 'length' => '6', 'null' => true, 'default' => null, ]) ->addColumn('target', 'integer', [ 'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, 'null' => true, 'default' => null, ]) ->addColumn('plays', 'integer', [ 'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, 'default' => 0, ]) ->addColumn('spend', 'decimal', [ 'precision' => 30, 'scale' => 4, 'default' => 0, ]) ->addColumn('impressions', 'decimal', [ 'precision' => 30, 'scale' => 4, 'default' => 0, ]) ->addColumn('lastPopId', 'string', [ 'length' => 50, 'default' => null, 'null' => true, ]) ->addColumn('listPlayOrder', 'string', [ 'length' => 6, 'default' => 'round', 'null' => false, ]) ->addColumn('ref1', 'string', [ 'default' => null, 'null' => true, 'limit' => 254 ]) ->addColumn('ref2', 'string', [ 'default' => null, 'null' => true, 'limit' => 254 ]) ->addColumn('ref3', 'string', [ 'default' => null, 'null' => true, 'limit' => 254 ]) ->addColumn('ref4', 'string', [ 'default' => null, 'null' => true, 'limit' => 254 ]) ->addColumn('ref5', 'string', [ 'default' => null, 'null' => true, 'limit' => 254 ]) ->addColumn('createdAt', 'timestamp', [ 'default' => 'CURRENT_TIMESTAMP', 'update' => '' ]) ->addColumn('modifiedAt', 'timestamp', [ 'null' => true, 'default' => null, 'update' => 'CURRENT_TIMESTAMP' ]) ->addColumn('modifiedBy', 'integer', [ 'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, 'default' => 0, ]) ->save(); // Direct links between the campaign and its target displays/groups $this->table('lkcampaigndisplaygroup', [ 'id' => false, 'primary_key' => ['campaignId', 'displayGroupId'] ]) ->addColumn('campaignId', 'integer', [ 'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, ]) ->addColumn('displayGroupId', 'integer', [ 'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, ]) ->addForeignKey('campaignId', 'campaign', 'campaignId') ->addForeignKey('displayGroupId', 'displaygroup', 'displayGroupId') ->save(); // Links between the campaign and the layout are extended to cover scheduling and geo fences. $this->table('lkcampaignlayout') ->addColumn('dayPartId', 'integer', [ 'default' => null, 'null' => true, 'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, ]) ->addColumn('daysOfWeek', 'string', [ 'default' => null, 'null' => true, 'limit' => 50, ]) ->addColumn('geoFence', 'text', [ 'default' => null, 'null' => true, 'limit' => \Phinx\Db\Adapter\MysqlAdapter::TEXT_MEDIUM, ]) ->save(); // Add a task for keeping ad campaigns up to date $this->table('task') ->insert([ 'name' => 'Campaign Scheduler', 'class' => '\Xibo\XTR\CampaignSchedulerTask', 'options' => '[]', 'schedule' => '45 * * * *', 'isActive' => '1', 'configFile' => '/tasks/campaign-scheduler.task' ]) ->save(); // Add parentCampaignId to the stats table. $this->table('stat') ->addColumn('parentCampaignId', 'integer', [ 'default' => 0, 'null' => false, 'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR, ]) ->save(); } } PK MqY߿ <