some migration stuff
This commit is contained in:
parent
8b6855adc9
commit
b7a15753d4
3 changed files with 31 additions and 2 deletions
|
@ -0,0 +1,28 @@
|
||||||
|
<?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->boolean('is_admin')->default(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('is_admin');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,9 +1,10 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { inertia, page } from '@inertiajs/svelte';
|
import { inertia, page } from '@inertiajs/svelte';
|
||||||
import { globalState } from "@/Library/PassState.svelte";
|
import { globalState } from "@/Library/PassState.svelte";
|
||||||
|
import type {Snippet} from "svelte";
|
||||||
|
|
||||||
//eslint-disable-next-line
|
//eslint-disable-next-line
|
||||||
let { children }: { children: any } = $props();
|
let { children }: { children: Snippet } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col h-screen">
|
<div class="flex flex-col h-screen">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#snippet title()}
|
{#snippet title()}
|
||||||
<h1 class="text-2xl font-bold">Meow</h1>
|
<h1 class="text-4xl font-bold">Meowdy!</h1>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|
Loading…
Add table
Reference in a new issue