database backup and some minor changes

This commit is contained in:
2024-11-25 21:08:55 -05:00
parent 725b62c31a
commit 37393d6909
3 changed files with 11 additions and 1 deletions

Binary file not shown.

View File

@@ -0,0 +1,10 @@
"use server";
import { eq, not , asc} from "drizzle-orm";
import { revalidatePath } from "next/cache";
import { db } from "@db/index";
import { State } from "@db/schema/States";
export const getData = async () => {
const data = await db.select().from(Account).orderBy(asc(Account.last_name));
return data;
};

View File

@@ -1,6 +1,6 @@
import { integer, varchar, pgTable } from "drizzle-orm/pg-core";
export const states = pgTable("states", {
export const State = pgTable("states", {
id: integer().primaryKey().generatedByDefaultAsIdentity({ name: "states_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
state: varchar({ length: 50 }),
abbreviation: varchar({ length: 50 }),