mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
feat: implement go_links table and update database connection handling
This commit is contained in:
parent
4aab557523
commit
1208866757
4 changed files with 44 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
import { sql } from "bun";
|
||||
import sql from "~/server/components/postgres";
|
||||
|
||||
const createUsers = await sql`
|
||||
create table if not exists users (
|
||||
|
@ -42,6 +42,17 @@ create table if not exists newsProvidersZh (
|
|||
)
|
||||
`;
|
||||
|
||||
|
||||
const createGoLinks = await sql`
|
||||
create table if not exists go_links {
|
||||
uuid text primary key,
|
||||
title text,
|
||||
slug text unique not null,
|
||||
forwardUrl text not null,
|
||||
created_at timestampz default current_timestamp
|
||||
}
|
||||
`
|
||||
/*
|
||||
const createAdminPosts = await sql`
|
||||
create table if not exists adminPosts (
|
||||
uuid text primary key,
|
||||
|
@ -59,6 +70,6 @@ create table if not exists adminUsers (
|
|||
created_at timestampz default current_timestamp,
|
||||
lastlogged_at timestampz default current_timestamp,
|
||||
)
|
||||
`;
|
||||
`;*/
|
||||
|
||||
console.log("Creation Complete");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue