pelican-panel-banquise/database/migrations/2024_06_04_212155_add_timezone_column.php
Lance Pioch cf37994c3b
Allow user to switch time zones (#332)
* Description not required

* Overwrite to use user’s time zone

* Allow users to change time zones

* Update app/Filament/Resources/UserResource/Pages/EditProfile.php

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>

* Pint fix

---------

Co-authored-by: Charles <charles@pelican.dev>
Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
2024-06-25 20:17:08 -04:00

29 lines
619 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('timezone')->default('UTC')->after('language');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('timezone');
});
}
};