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
+123 -7
View File
@@ -285,7 +285,6 @@ export type AlertOrderByWithRelationInput = {
diff?: Prisma.SortOrder
diffRatio?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
_relevance?: Prisma.AlertOrderByRelevanceInput
}
export type AlertWhereUniqueInput = Prisma.AtLeast<{
@@ -426,12 +425,6 @@ export type AlertUncheckedUpdateManyInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AlertOrderByRelevanceInput = {
fields: Prisma.AlertOrderByRelevanceFieldEnum | Prisma.AlertOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type AlertCountOrderByAggregateInput = {
id?: Prisma.SortOrder
indicatorName?: Prisma.SortOrder
@@ -502,7 +495,31 @@ export type AlertSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
createdAt?: boolean
}, ExtArgs["result"]["alert"]>
export type AlertSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
indicatorName?: boolean
period?: boolean
valueA?: boolean
valueB?: boolean
sourceA?: boolean
sourceB?: boolean
diff?: boolean
diffRatio?: boolean
createdAt?: boolean
}, ExtArgs["result"]["alert"]>
export type AlertSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
indicatorName?: boolean
period?: boolean
valueA?: boolean
valueB?: boolean
sourceA?: boolean
sourceB?: boolean
diff?: boolean
diffRatio?: boolean
createdAt?: boolean
}, ExtArgs["result"]["alert"]>
export type AlertSelectScalar = {
id?: boolean
@@ -650,6 +667,30 @@ export interface AlertDelegate<ExtArgs extends runtime.Types.Extensions.Internal
*/
createMany<T extends AlertCreateManyArgs>(args?: Prisma.SelectSubset<T, AlertCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many Alerts and returns the data saved in the database.
* @param {AlertCreateManyAndReturnArgs} args - Arguments to create many Alerts.
* @example
* // Create many Alerts
* const alert = await prisma.alert.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Alerts and only return the `id`
* const alertWithIdOnly = await prisma.alert.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 AlertCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, AlertCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a Alert.
* @param {AlertDeleteArgs} args - Arguments to delete one Alert.
@@ -714,6 +755,36 @@ export interface AlertDelegate<ExtArgs extends runtime.Types.Extensions.Internal
*/
updateMany<T extends AlertUpdateManyArgs>(args: Prisma.SelectSubset<T, AlertUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Alerts and returns the data updated in the database.
* @param {AlertUpdateManyAndReturnArgs} args - Arguments to update many Alerts.
* @example
* // Update many Alerts
* const alert = await prisma.alert.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more Alerts and only return the `id`
* const alertWithIdOnly = await prisma.alert.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 AlertUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, AlertUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AlertPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one Alert.
* @param {AlertUpsertArgs} args - Arguments to update or create a Alert.
@@ -1125,6 +1196,25 @@ export type AlertCreateManyArgs<ExtArgs extends runtime.Types.Extensions.Interna
skipDuplicates?: boolean
}
/**
* Alert createManyAndReturn
*/
export type AlertCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* The data used to create many Alerts.
*/
data: Prisma.AlertCreateManyInput | Prisma.AlertCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Alert update
*/
@@ -1165,6 +1255,32 @@ export type AlertUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.Interna
limit?: number
}
/**
* Alert updateManyAndReturn
*/
export type AlertUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Alert
*/
select?: Prisma.AlertSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Alert
*/
omit?: Prisma.AlertOmit<ExtArgs> | null
/**
* The data used to update Alerts.
*/
data: Prisma.XOR<Prisma.AlertUpdateManyMutationInput, Prisma.AlertUncheckedUpdateManyInput>
/**
* Filter which Alerts to update
*/
where?: Prisma.AlertWhereInput
/**
* Limit how many Alerts to update.
*/
limit?: number
}
/**
* Alert upsert
*/