public function up() { DbDongle::disableStrictMode(); foreach ($this->backendTables as $table) { DbDongle::convertTimestamps($table); } // Use this opportunity to reset backend preferences and styles for stable Db::table('system_settings')->where('item', 'backend_brand_settings')->delete(); Db::table('backend_user_preferences')->where('namespace', 'backend')->where('group', 'backend')->where('item', 'preferences')->delete(); }
public function up() { DbDongle::disableStrictMode(); foreach ($this->coreTables as $table => $columns) { if (is_int($table)) { $table = $columns; $columns = ['created_at', 'updated_at']; } DbDongle::convertTimestamps($table, $columns); } }
public function up() { DbDongle::disableStrictMode(); DbDongle::convertTimestamps('cms_theme_data'); // Use this opportunity to patch the theme.yaml file for stable $demoTheme = base_path('themes/demo/theme.yaml'); if (file_exists($demoTheme) && is_writable($demoTheme)) { $contents = file_get_contents($demoTheme); $search = "description: Demo OctoberCMS theme. Demonstrates the basic concepts of the front-end theming: layouts, pages, partials, components, content blocks, AJAX framework."; $replace = "description: 'Demo OctoberCMS theme. Demonstrates the basic concepts of the front-end theming: layouts, pages, partials, components, content blocks, AJAX framework.'"; $contents = str_replace($search, $replace, $contents); file_put_contents($demoTheme, $contents); } }