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
+115 -7
View File
@@ -233,7 +233,6 @@ export type MihomeAccountOrderByWithRelationInput = {
status?: Prisma.SortOrder
lastError?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
_relevance?: Prisma.MihomeAccountOrderByRelevanceInput
}
export type MihomeAccountWhereUniqueInput = Prisma.AtLeast<{
@@ -334,12 +333,6 @@ export type MihomeAccountUncheckedUpdateManyInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type MihomeAccountOrderByRelevanceInput = {
fields: Prisma.MihomeAccountOrderByRelevanceFieldEnum | Prisma.MihomeAccountOrderByRelevanceFieldEnum[]
sort: Prisma.SortOrder
search: string
}
export type MihomeAccountCountOrderByAggregateInput = {
id?: Prisma.SortOrder
key?: Prisma.SortOrder
@@ -386,7 +379,23 @@ export type MihomeAccountSelect<ExtArgs extends runtime.Types.Extensions.Interna
updatedAt?: boolean
}, ExtArgs["result"]["mihomeAccount"]>
export type MihomeAccountSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
key?: boolean
userId?: boolean
status?: boolean
lastError?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["mihomeAccount"]>
export type MihomeAccountSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
key?: boolean
userId?: boolean
status?: boolean
lastError?: boolean
updatedAt?: boolean
}, ExtArgs["result"]["mihomeAccount"]>
export type MihomeAccountSelectScalar = {
id?: boolean
@@ -526,6 +535,30 @@ export interface MihomeAccountDelegate<ExtArgs extends runtime.Types.Extensions.
*/
createMany<T extends MihomeAccountCreateManyArgs>(args?: Prisma.SelectSubset<T, MihomeAccountCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many MihomeAccounts and returns the data saved in the database.
* @param {MihomeAccountCreateManyAndReturnArgs} args - Arguments to create many MihomeAccounts.
* @example
* // Create many MihomeAccounts
* const mihomeAccount = await prisma.mihomeAccount.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many MihomeAccounts and only return the `id`
* const mihomeAccountWithIdOnly = await prisma.mihomeAccount.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 MihomeAccountCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, MihomeAccountCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MihomeAccountPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a MihomeAccount.
* @param {MihomeAccountDeleteArgs} args - Arguments to delete one MihomeAccount.
@@ -590,6 +623,36 @@ export interface MihomeAccountDelegate<ExtArgs extends runtime.Types.Extensions.
*/
updateMany<T extends MihomeAccountUpdateManyArgs>(args: Prisma.SelectSubset<T, MihomeAccountUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more MihomeAccounts and returns the data updated in the database.
* @param {MihomeAccountUpdateManyAndReturnArgs} args - Arguments to update many MihomeAccounts.
* @example
* // Update many MihomeAccounts
* const mihomeAccount = await prisma.mihomeAccount.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more MihomeAccounts and only return the `id`
* const mihomeAccountWithIdOnly = await prisma.mihomeAccount.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 MihomeAccountUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, MihomeAccountUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MihomeAccountPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one MihomeAccount.
* @param {MihomeAccountUpsertArgs} args - Arguments to update or create a MihomeAccount.
@@ -997,6 +1060,25 @@ export type MihomeAccountCreateManyArgs<ExtArgs extends runtime.Types.Extensions
skipDuplicates?: boolean
}
/**
* MihomeAccount createManyAndReturn
*/
export type MihomeAccountCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the MihomeAccount
*/
select?: Prisma.MihomeAccountSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the MihomeAccount
*/
omit?: Prisma.MihomeAccountOmit<ExtArgs> | null
/**
* The data used to create many MihomeAccounts.
*/
data: Prisma.MihomeAccountCreateManyInput | Prisma.MihomeAccountCreateManyInput[]
skipDuplicates?: boolean
}
/**
* MihomeAccount update
*/
@@ -1037,6 +1119,32 @@ export type MihomeAccountUpdateManyArgs<ExtArgs extends runtime.Types.Extensions
limit?: number
}
/**
* MihomeAccount updateManyAndReturn
*/
export type MihomeAccountUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the MihomeAccount
*/
select?: Prisma.MihomeAccountSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the MihomeAccount
*/
omit?: Prisma.MihomeAccountOmit<ExtArgs> | null
/**
* The data used to update MihomeAccounts.
*/
data: Prisma.XOR<Prisma.MihomeAccountUpdateManyMutationInput, Prisma.MihomeAccountUncheckedUpdateManyInput>
/**
* Filter which MihomeAccounts to update
*/
where?: Prisma.MihomeAccountWhereInput
/**
* Limit how many MihomeAccounts to update.
*/
limit?: number
}
/**
* MihomeAccount upsert
*/