UNPKG

@oberoncms/plugin-pgsql

Version:

A PostgreSQL database plugin for OberonCMS

23 lines (22 loc) 600 B
import { pgTable, text, integer, timestamp, uniqueIndex } from "drizzle-orm/pg-core"; const images = pgTable( "images", { key: text("key").notNull().primaryKey(), url: text("url").notNull(), alt: text("alt").notNull(), size: integer("size").notNull(), height: integer("height").notNull(), width: integer("width").notNull(), updatedAt: timestamp("updated_at", { mode: "date" }).notNull(), updatedBy: text("updated_by").notNull() }, (images2) => { return { imagesKeyIdx: uniqueIndex("images_key_idx").on(images2.key) }; } ); export { images };