mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 07:41:02 +08:00
Push Create database?
This commit is contained in:
parent
61f56a8c0a
commit
a720bdd582
@ -34,8 +34,8 @@ export default defineEventHandler(async (event) => {
|
|||||||
|
|
||||||
const createUserOtherData = await sql`
|
const createUserOtherData = await sql`
|
||||||
create table if not exists user_other_data (
|
create table if not exists user_other_data (
|
||||||
user_id text primary key ,
|
user_id text primary key,
|
||||||
user text not null unique,
|
username text not null unique,
|
||||||
groq_api_key text,
|
groq_api_key text,
|
||||||
starred_news JSON not null,
|
starred_news JSON not null,
|
||||||
translate_provider text,
|
translate_provider text,
|
||||||
@ -51,11 +51,21 @@ export default defineEventHandler(async (event) => {
|
|||||||
)
|
)
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const createArticlesArchive = await sql`
|
||||||
|
create table if not exists news_articles (
|
||||||
|
uuid text primary key,
|
||||||
|
article_id text primary key,
|
||||||
|
jsondata json not null,
|
||||||
|
archive_timestamp timestamp default CURRENT_TIMESTAMP,
|
||||||
|
)
|
||||||
|
`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
createUsers: createUsers,
|
createUsers: createUsers,
|
||||||
usersList: usersList,
|
usersList: usersList,
|
||||||
createUserAiChatHistory: createUserAiChatHistory,
|
createUserAiChatHistory: createUserAiChatHistory,
|
||||||
createSources: createSources,
|
createSources: createSources,
|
||||||
createUserOtherData: createUserOtherData,
|
createUserOtherData: createUserOtherData,
|
||||||
|
createArticlesArchive: createArticlesArchive,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user