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
+113 -7
View File
@@ -228,7 +228,6 @@ export type Econ_SowInventoryOrderByWithRelationInput = {
inventory?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
_relevance?: Prisma.Econ_SowInventoryOrderByRelevanceInput
}
export type Econ_SowInventoryWhereUniqueInput = Prisma.AtLeast<{
@@ -319,12 +318,6 @@ export type Econ_SowInventoryUncheckedUpdateManyInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type Econ_SowInventoryOrderByRelevanceInput = {
fields: Prisma.Econ_SowInventoryOrderByRelevanceFieldEnum | Prisma.Econ_SowInventoryOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type Econ_SowInventoryCountOrderByAggregateInput = {
id?: Prisma.SortOrder
month?: Prisma.SortOrder
@@ -369,7 +362,21 @@ export type Econ_SowInventorySelect<ExtArgs extends runtime.Types.Extensions.Int
updatedAt?: boolean
}, ExtArgs["result"]["econ_SowInventory"]>
export type Econ_SowInventorySelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
month?: boolean
inventory?: boolean
createdAt?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["econ_SowInventory"]>
export type Econ_SowInventorySelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
month?: boolean
inventory?: boolean
createdAt?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["econ_SowInventory"]>
export type Econ_SowInventorySelectScalar = {
id?: boolean
@@ -507,6 +514,30 @@ export interface Econ_SowInventoryDelegate<ExtArgs extends runtime.Types.Extensi
*/
createMany<T extends Econ_SowInventoryCreateManyArgs>(args?: Prisma.SelectSubset<T, Econ_SowInventoryCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many Econ_SowInventories and returns the data saved in the database.
* @param {Econ_SowInventoryCreateManyAndReturnArgs} args - Arguments to create many Econ_SowInventories.
* @example
* // Create many Econ_SowInventories
* const econ_SowInventory = await prisma.econ_SowInventory.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many Econ_SowInventories and only return the `id`
* const econ_SowInventoryWithIdOnly = await prisma.econ_SowInventory.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 Econ_SowInventoryCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, Econ_SowInventoryCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$Econ_SowInventoryPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a Econ_SowInventory.
* @param {Econ_SowInventoryDeleteArgs} args - Arguments to delete one Econ_SowInventory.
@@ -571,6 +602,36 @@ export interface Econ_SowInventoryDelegate<ExtArgs extends runtime.Types.Extensi
*/
updateMany<T extends Econ_SowInventoryUpdateManyArgs>(args: Prisma.SelectSubset<T, Econ_SowInventoryUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more Econ_SowInventories and returns the data updated in the database.
* @param {Econ_SowInventoryUpdateManyAndReturnArgs} args - Arguments to update many Econ_SowInventories.
* @example
* // Update many Econ_SowInventories
* const econ_SowInventory = await prisma.econ_SowInventory.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more Econ_SowInventories and only return the `id`
* const econ_SowInventoryWithIdOnly = await prisma.econ_SowInventory.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 Econ_SowInventoryUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, Econ_SowInventoryUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$Econ_SowInventoryPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one Econ_SowInventory.
* @param {Econ_SowInventoryUpsertArgs} args - Arguments to update or create a Econ_SowInventory.
@@ -977,6 +1038,25 @@ export type Econ_SowInventoryCreateManyArgs<ExtArgs extends runtime.Types.Extens
skipDuplicates?: boolean
}
/**
* Econ_SowInventory createManyAndReturn
*/
export type Econ_SowInventoryCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Econ_SowInventory
*/
select?: Prisma.Econ_SowInventorySelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Econ_SowInventory
*/
omit?: Prisma.Econ_SowInventoryOmit<ExtArgs> | null
/**
* The data used to create many Econ_SowInventories.
*/
data: Prisma.Econ_SowInventoryCreateManyInput | Prisma.Econ_SowInventoryCreateManyInput[]
skipDuplicates?: boolean
}
/**
* Econ_SowInventory update
*/
@@ -1017,6 +1097,32 @@ export type Econ_SowInventoryUpdateManyArgs<ExtArgs extends runtime.Types.Extens
limit?: number
}
/**
* Econ_SowInventory updateManyAndReturn
*/
export type Econ_SowInventoryUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Econ_SowInventory
*/
select?: Prisma.Econ_SowInventorySelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the Econ_SowInventory
*/
omit?: Prisma.Econ_SowInventoryOmit<ExtArgs> | null
/**
* The data used to update Econ_SowInventories.
*/
data: Prisma.XOR<Prisma.Econ_SowInventoryUpdateManyMutationInput, Prisma.Econ_SowInventoryUncheckedUpdateManyInput>
/**
* Filter which Econ_SowInventories to update
*/
where?: Prisma.Econ_SowInventoryWhereInput
/**
* Limit how many Econ_SowInventories to update.
*/
limit?: number
}
/**
* Econ_SowInventory upsert
*/