@@ -10,13 +10,18 @@ class AddStyleToPreferences extends Migration
|
||||
{
|
||||
if ($this->db->tableExists('user_preferences')) {
|
||||
if (! $this->db->fieldExists('style_color', 'user_preferences')) {
|
||||
$styleColor = [
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 32,
|
||||
'null' => true,
|
||||
];
|
||||
|
||||
if ($this->db->fieldExists('timezone', 'user_preferences')) {
|
||||
$styleColor['after'] = 'timezone';
|
||||
}
|
||||
|
||||
$this->forge->addColumn('user_preferences', [
|
||||
'style_color' => [
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 32,
|
||||
'null' => true,
|
||||
'after' => 'timezone',
|
||||
],
|
||||
'style_color' => $styleColor,
|
||||
]);
|
||||
}
|
||||
if (! $this->db->fieldExists('menu_color', 'user_preferences')) {
|
||||
|
||||
Reference in New Issue
Block a user