Files
next-portfolio/src/db/schema/photo.ts
2024-11-14 12:57:24 +00:00

23 lines
554 B
TypeScript

import { int, sqliteTable, text, blob, real } from "drizzle-orm/sqlite-core";
export const photosTable = sqliteTable(
"photo",
{
id: int().primaryKey({ autoIncrement: true }),
src: text().notNull().unique(),
width: int().notNull(),
height: int().notNull(),
blur: blob().notNull(),
camera: text(),
title: text(),
description: text(),
exposureBiasValue: int(),
fNumber: real(),
isoSpeedRatings: int(),
focalLength: int(),
dateTimeOriginal: int({ mode: 'timestamp' }),
lensModel: text(),
}
);