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
+131 -7
View File
@@ -243,7 +243,6 @@ export type IndicatorPointOrderByWithRelationInput = {
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
indicator?: Prisma.IndicatorOrderByWithRelationInput
_relevance?: Prisma.IndicatorPointOrderByRelevanceInput
}
export type IndicatorPointWhereUniqueInput = Prisma.AtLeast<{
@@ -355,12 +354,6 @@ export type IndicatorPointOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type IndicatorPointOrderByRelevanceInput = {
fields: Prisma.IndicatorPointOrderByRelevanceFieldEnum | Prisma.IndicatorPointOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type IndicatorPointIndicatorIdPeriodCompoundUniqueInput = {
indicatorId: number
period: string
@@ -551,7 +544,25 @@ export type IndicatorPointSelect<ExtArgs extends runtime.Types.Extensions.Intern
indicator?: boolean | Prisma.IndicatorDefaultArgs<ExtArgs>
}, ExtArgs["result"]["indicatorPoint"]>
export type IndicatorPointSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
indicatorId?: boolean
period?: boolean
value?: boolean
createdAt?: boolean
updatedAt?: boolean
indicator?: boolean | Prisma.IndicatorDefaultArgs<ExtArgs>
}, ExtArgs["result"]["indicatorPoint"]>
export type IndicatorPointSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
indicatorId?: boolean
period?: boolean
value?: boolean
createdAt?: boolean
updatedAt?: boolean
indicator?: boolean | Prisma.IndicatorDefaultArgs<ExtArgs>
}, ExtArgs["result"]["indicatorPoint"]>
export type IndicatorPointSelectScalar = {
id?: boolean
@@ -566,6 +577,12 @@ export type IndicatorPointOmit<ExtArgs extends runtime.Types.Extensions.Internal
export type IndicatorPointInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
indicator?: boolean | Prisma.IndicatorDefaultArgs<ExtArgs>
}
export type IndicatorPointIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
indicator?: boolean | Prisma.IndicatorDefaultArgs<ExtArgs>
}
export type IndicatorPointIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
indicator?: boolean | Prisma.IndicatorDefaultArgs<ExtArgs>
}
export type $IndicatorPointPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "IndicatorPoint"
@@ -696,6 +713,30 @@ export interface IndicatorPointDelegate<ExtArgs extends runtime.Types.Extensions
*/
createMany<T extends IndicatorPointCreateManyArgs>(args?: Prisma.SelectSubset<T, IndicatorPointCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many IndicatorPoints and returns the data saved in the database.
* @param {IndicatorPointCreateManyAndReturnArgs} args - Arguments to create many IndicatorPoints.
* @example
* // Create many IndicatorPoints
* const indicatorPoint = await prisma.indicatorPoint.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many IndicatorPoints and only return the `id`
* const indicatorPointWithIdOnly = await prisma.indicatorPoint.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 IndicatorPointCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, IndicatorPointCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$IndicatorPointPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a IndicatorPoint.
* @param {IndicatorPointDeleteArgs} args - Arguments to delete one IndicatorPoint.
@@ -760,6 +801,36 @@ export interface IndicatorPointDelegate<ExtArgs extends runtime.Types.Extensions
*/
updateMany<T extends IndicatorPointUpdateManyArgs>(args: Prisma.SelectSubset<T, IndicatorPointUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more IndicatorPoints and returns the data updated in the database.
* @param {IndicatorPointUpdateManyAndReturnArgs} args - Arguments to update many IndicatorPoints.
* @example
* // Update many IndicatorPoints
* const indicatorPoint = await prisma.indicatorPoint.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more IndicatorPoints and only return the `id`
* const indicatorPointWithIdOnly = await prisma.indicatorPoint.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 IndicatorPointUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, IndicatorPointUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$IndicatorPointPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one IndicatorPoint.
* @param {IndicatorPointUpsertArgs} args - Arguments to update or create a IndicatorPoint.
@@ -1192,6 +1263,29 @@ export type IndicatorPointCreateManyArgs<ExtArgs extends runtime.Types.Extension
skipDuplicates?: boolean
}
/**
* IndicatorPoint createManyAndReturn
*/
export type IndicatorPointCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the IndicatorPoint
*/
select?: Prisma.IndicatorPointSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the IndicatorPoint
*/
omit?: Prisma.IndicatorPointOmit<ExtArgs> | null
/**
* The data used to create many IndicatorPoints.
*/
data: Prisma.IndicatorPointCreateManyInput | Prisma.IndicatorPointCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.IndicatorPointIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* IndicatorPoint update
*/
@@ -1236,6 +1330,36 @@ export type IndicatorPointUpdateManyArgs<ExtArgs extends runtime.Types.Extension
limit?: number
}
/**
* IndicatorPoint updateManyAndReturn
*/
export type IndicatorPointUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the IndicatorPoint
*/
select?: Prisma.IndicatorPointSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the IndicatorPoint
*/
omit?: Prisma.IndicatorPointOmit<ExtArgs> | null
/**
* The data used to update IndicatorPoints.
*/
data: Prisma.XOR<Prisma.IndicatorPointUpdateManyMutationInput, Prisma.IndicatorPointUncheckedUpdateManyInput>
/**
* Filter which IndicatorPoints to update
*/
where?: Prisma.IndicatorPointWhereInput
/**
* Limit how many IndicatorPoints to update.
*/
limit?: number
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.IndicatorPointIncludeUpdateManyAndReturn<ExtArgs> | null
}
/**
* IndicatorPoint upsert
*/