schema update: change from timestamp to date

This commit is contained in:
2026-02-11 21:55:35 +13:00
parent e978d0df97
commit 865846c6be
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts">
import * as Item from "$lib/components/ui/item/index.js";
import { CalendarDate, parseAbsolute } from "@internationalized/date";
import { CalendarDate, parseDate } from "@internationalized/date";
import { marked } from 'marked';
import { formatDate } from "$lib/date.ts";
@@ -14,7 +14,7 @@
const formattedDate = formatDate(entry.date);
function select() { value = parseAbsolute(entry.date) }
function select() { value = parseDate(entry.date) }
</script>
<button class="border border-white/30 rounded-xl w-full hover:brightness-80 transition-all mb-3" onclick={select}>

View File

@@ -1,8 +1,8 @@
import { text, integer, pgTable, json, timestamp } from "drizzle-orm/pg-core";
import { text, integer, pgTable, json, date } from "drizzle-orm/pg-core";
export const entryTable = pgTable("entries", {
id: integer().primaryKey().generatedAlwaysAsIdentity(),
date: timestamp({ mode: 'date', withTimezone: true }).notNull().defaultNow(),
date: date().notNull().defaultNow(),
location: json(),
content: text(),
image: text()