feat(0.2.1): M1 数据库迁移 PostgreSQL —— schema 切 pg, 任务域六表加 uuid, 项目 code/任务 number, db.js 切 adapter-pg, 重建 PG 基线迁移; 附实施方案文档

This commit is contained in:
jif2.zhang
2026-10-25 23:38:54 +08:00
parent 1cd5b85a4b
commit 61d3028909
61 changed files with 17254 additions and 1354 deletions
+117 -7
View File
@@ -242,7 +242,6 @@ export type ArticleOrderByWithRelationInput = {
date?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
_relevance?: Prisma.ArticleOrderByRelevanceInput
}
export type ArticleWhereUniqueInput = Prisma.AtLeast<{
@@ -353,12 +352,6 @@ export type ArticleUncheckedUpdateManyInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type ArticleOrderByRelevanceInput = {
fields: Prisma.ArticleOrderByRelevanceFieldEnum | Prisma.ArticleOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type ArticleCountOrderByAggregateInput = {
id?: Prisma.SortOrder
title?: Prisma.SortOrder
@@ -409,7 +402,25 @@ export type ArticleSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
updatedAt?: boolean
}, ExtArgs["result"]["article"]>
export type ArticleSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
title?: boolean
slug?: boolean
content?: boolean
date?: boolean
createdAt?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["article"]>
export type ArticleSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
title?: boolean
slug?: boolean
content?: boolean
date?: boolean
createdAt?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["article"]>
export type ArticleSelectScalar = {
id?: boolean
@@ -551,6 +562,30 @@ export interface ArticleDelegate<ExtArgs extends runtime.Types.Extensions.Intern
*/
createMany<T extends ArticleCreateManyArgs>(args?: Prisma.SelectSubset<T, ArticleCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many Articles and returns the data saved in the database.
* @param {ArticleCreateManyAndReturnArgs} args - Arguments to create many Articles.
* @example
* // Create many Articles
* const article = await prisma.article.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Articles and only return the `id`
* const articleWithIdOnly = await prisma.article.createManyAndReturn({
* select: { id: true },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
createManyAndReturn<T extends ArticleCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, ArticleCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ArticlePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a Article.
* @param {ArticleDeleteArgs} args - Arguments to delete one Article.
@@ -615,6 +650,36 @@ export interface ArticleDelegate<ExtArgs extends runtime.Types.Extensions.Intern
*/
updateMany<T extends ArticleUpdateManyArgs>(args: Prisma.SelectSubset<T, ArticleUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Articles and returns the data updated in the database.
* @param {ArticleUpdateManyAndReturnArgs} args - Arguments to update many Articles.
* @example
* // Update many Articles
* const article = await prisma.article.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more Articles and only return the `id`
* const articleWithIdOnly = await prisma.article.updateManyAndReturn({
* select: { id: true },
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
updateManyAndReturn<T extends ArticleUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, ArticleUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ArticlePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one Article.
* @param {ArticleUpsertArgs} args - Arguments to update or create a Article.
@@ -1023,6 +1088,25 @@ export type ArticleCreateManyArgs<ExtArgs extends runtime.Types.Extensions.Inter
skipDuplicates?: boolean
}
/**
* Article createManyAndReturn
*/
export type ArticleCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Article
*/
select?: Prisma.ArticleSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Article
*/
omit?: Prisma.ArticleOmit<ExtArgs> | null
/**
* The data used to create many Articles.
*/
data: Prisma.ArticleCreateManyInput | Prisma.ArticleCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Article update
*/
@@ -1063,6 +1147,32 @@ export type ArticleUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.Inter
limit?: number
}
/**
* Article updateManyAndReturn
*/
export type ArticleUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Article
*/
select?: Prisma.ArticleSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Article
*/
omit?: Prisma.ArticleOmit<ExtArgs> | null
/**
* The data used to update Articles.
*/
data: Prisma.XOR<Prisma.ArticleUpdateManyMutationInput, Prisma.ArticleUncheckedUpdateManyInput>
/**
* Filter which Articles to update
*/
where?: Prisma.ArticleWhereInput
/**
* Limit how many Articles to update.
*/
limit?: number
}
/**
* Article upsert
*/