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
+135 -7
View File
@@ -259,7 +259,6 @@ export type CheckListOrderByWithRelationInput = {
updatedAt?: Prisma.SortOrder
user?: Prisma.UserOrderByWithRelationInput
items?: Prisma.CheckListItemOrderByRelationAggregateInput
_relevance?: Prisma.CheckListOrderByRelevanceInput
}
export type CheckListWhereUniqueInput = Prisma.AtLeast<{
@@ -395,12 +394,6 @@ export type CheckListOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type CheckListOrderByRelevanceInput = {
fields: Prisma.CheckListOrderByRelevanceFieldEnum | Prisma.CheckListOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type CheckListCountOrderByAggregateInput = {
id?: Prisma.SortOrder
userId?: Prisma.SortOrder
@@ -710,7 +703,29 @@ export type CheckListSelect<ExtArgs extends runtime.Types.Extensions.InternalArg
_count?: boolean | Prisma.CheckListCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["checkList"]>
export type CheckListSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
userId?: boolean
title?: boolean
scene?: boolean
note?: boolean
archived?: boolean
createdAt?: boolean
updatedAt?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["checkList"]>
export type CheckListSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
userId?: boolean
title?: boolean
scene?: boolean
note?: boolean
archived?: boolean
createdAt?: boolean
updatedAt?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["checkList"]>
export type CheckListSelectScalar = {
id?: boolean
@@ -729,6 +744,12 @@ export type CheckListInclude<ExtArgs extends runtime.Types.Extensions.InternalAr
items?: boolean | Prisma.CheckList$itemsArgs<ExtArgs>
_count?: boolean | Prisma.CheckListCountOutputTypeDefaultArgs<ExtArgs>
}
export type CheckListIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type CheckListIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type $CheckListPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "CheckList"
@@ -862,6 +883,30 @@ export interface CheckListDelegate<ExtArgs extends runtime.Types.Extensions.Inte
*/
createMany<T extends CheckListCreateManyArgs>(args?: Prisma.SelectSubset<T, CheckListCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many CheckLists and returns the data saved in the database.
* @param {CheckListCreateManyAndReturnArgs} args - Arguments to create many CheckLists.
* @example
* // Create many CheckLists
* const checkList = await prisma.checkList.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many CheckLists and only return the `id`
* const checkListWithIdOnly = await prisma.checkList.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 CheckListCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, CheckListCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CheckListPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a CheckList.
* @param {CheckListDeleteArgs} args - Arguments to delete one CheckList.
@@ -926,6 +971,36 @@ export interface CheckListDelegate<ExtArgs extends runtime.Types.Extensions.Inte
*/
updateMany<T extends CheckListUpdateManyArgs>(args: Prisma.SelectSubset<T, CheckListUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more CheckLists and returns the data updated in the database.
* @param {CheckListUpdateManyAndReturnArgs} args - Arguments to update many CheckLists.
* @example
* // Update many CheckLists
* const checkList = await prisma.checkList.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more CheckLists and only return the `id`
* const checkListWithIdOnly = await prisma.checkList.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 CheckListUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, CheckListUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CheckListPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one CheckList.
* @param {CheckListUpsertArgs} args - Arguments to update or create a CheckList.
@@ -1361,6 +1436,29 @@ export type CheckListCreateManyArgs<ExtArgs extends runtime.Types.Extensions.Int
skipDuplicates?: boolean
}
/**
* CheckList createManyAndReturn
*/
export type CheckListCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the CheckList
*/
select?: Prisma.CheckListSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the CheckList
*/
omit?: Prisma.CheckListOmit<ExtArgs> | null
/**
* The data used to create many CheckLists.
*/
data: Prisma.CheckListCreateManyInput | Prisma.CheckListCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CheckListIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* CheckList update
*/
@@ -1405,6 +1503,36 @@ export type CheckListUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.Int
limit?: number
}
/**
* CheckList updateManyAndReturn
*/
export type CheckListUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the CheckList
*/
select?: Prisma.CheckListSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the CheckList
*/
omit?: Prisma.CheckListOmit<ExtArgs> | null
/**
* The data used to update CheckLists.
*/
data: Prisma.XOR<Prisma.CheckListUpdateManyMutationInput, Prisma.CheckListUncheckedUpdateManyInput>
/**
* Filter which CheckLists to update
*/
where?: Prisma.CheckListWhereInput
/**
* Limit how many CheckLists to update.
*/
limit?: number
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.CheckListIncludeUpdateManyAndReturn<ExtArgs> | null
}
/**
* CheckList upsert
*/