mirror of
https://github.com/slawkens/myaac.git
synced 2025-12-10 11:00:47 +01:00
[WIP] Add access option to Menus
Thanks @joelslamospersson for idea
This commit is contained in:
16
system/migrations/48.php
Normal file
16
system/migrations/48.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @var OTS_DB_MySQL $db
|
||||
*/
|
||||
|
||||
$up = function () use ($db) {
|
||||
if (!$db->hasColumn(TABLE_PREFIX . 'menu', 'access')) {
|
||||
$db->addColumn(TABLE_PREFIX . 'menu', 'access', 'TINYINT NOT NULL DEFAULT 0 AFTER `link`');
|
||||
}
|
||||
};
|
||||
|
||||
$down = function () use ($db) {
|
||||
if ($db->hasColumn(TABLE_PREFIX . 'menu', 'access')) {
|
||||
$db->dropColumn(TABLE_PREFIX . 'menu', 'access');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user