schema update: change from timestamp to date
This commit is contained in:
@@ -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}>
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user