PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.
You can fix this by adding a namespace to your class:
namespaceYourVendor;classYourClass{}
When choosing a vendor namespace, try to pick something that is not too generic
to avoid conflicts with other libraries.
Loading history...
13
{
14
/**
15
* Migrate Up.
16
*/
17
public function up()
18
{
19
$this->execute('CREATE TABLE IF NOT EXISTS media (id BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT, userId BIGINT(20) unsigned NOT NULL, module VARCHAR(24) DEFAULT \'users\' NOT NULL, title LONGTEXT, type VARCHAR(24), file VARCHAR(255), thumb VARCHAR(255), size INT(11) unsigned NOT NULL, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, updated TIMESTAMP NOT NULL, CONSTRAINT media_users_id_fk FOREIGN KEY (userId) REFERENCES users (id) ON DELETE CASCADE ON UPDATE CASCADE);');
20
$this->execute('REPLACE INTO `acl_privileges` (`roleId`, `module`, `privilege`) VALUES (2,\'media\',\'Management\'), (2,\'media\',\'Upload\'), (3,\'media\',\'Upload\');');
21
}
22
/**
23
* Migrate Down.
24
*/
25
public function down()
26
{
27
$this->dropTable('media');
28
$this->execute('DELETE FROM `acl_privileges` WHERE module=\'media\'');
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.