feat(0.2.1): M1 数据库迁移 PostgreSQL —— schema 切 pg, 任务域六表加 uuid, 项目 code/任务 number, db.js 切 adapter-pg, 重建 PG 基线迁移; 附实施方案文档
This commit is contained in:
@@ -366,7 +366,6 @@ export type MihomeDeviceOrderByWithRelationInput = {
|
||||
home?: Prisma.MihomeHomeOrderByWithRelationInput
|
||||
samples?: Prisma.MihomeEnvSampleOrderByRelationAggregateInput
|
||||
hours?: Prisma.MihomeEnvHourOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.MihomeDeviceOrderByRelevanceInput
|
||||
}
|
||||
|
||||
export type MihomeDeviceWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -597,12 +596,6 @@ export type MihomeDeviceOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type MihomeDeviceOrderByRelevanceInput = {
|
||||
fields: Prisma.MihomeDeviceOrderByRelevanceFieldEnum | Prisma.MihomeDeviceOrderByRelevanceFieldEnum[]
|
||||
sort: Prisma.SortOrder
|
||||
search: string
|
||||
}
|
||||
|
||||
export type MihomeDeviceCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
did?: Prisma.SortOrder
|
||||
@@ -1201,7 +1194,47 @@ export type MihomeDeviceSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
_count?: boolean | Prisma.MihomeDeviceCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["mihomeDevice"]>
|
||||
|
||||
export type MihomeDeviceSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
did?: boolean
|
||||
homeId?: boolean
|
||||
model?: boolean
|
||||
name?: boolean
|
||||
alias?: boolean
|
||||
tempSiid?: boolean
|
||||
tempPiid?: boolean
|
||||
humSiid?: boolean
|
||||
humPiid?: boolean
|
||||
battSiid?: boolean
|
||||
battPiid?: boolean
|
||||
battery?: boolean
|
||||
batteryAt?: boolean
|
||||
enabled?: boolean
|
||||
lastSyncAt?: boolean
|
||||
createdAt?: boolean
|
||||
home?: boolean | Prisma.MihomeHomeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["mihomeDevice"]>
|
||||
|
||||
export type MihomeDeviceSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
did?: boolean
|
||||
homeId?: boolean
|
||||
model?: boolean
|
||||
name?: boolean
|
||||
alias?: boolean
|
||||
tempSiid?: boolean
|
||||
tempPiid?: boolean
|
||||
humSiid?: boolean
|
||||
humPiid?: boolean
|
||||
battSiid?: boolean
|
||||
battPiid?: boolean
|
||||
battery?: boolean
|
||||
batteryAt?: boolean
|
||||
enabled?: boolean
|
||||
lastSyncAt?: boolean
|
||||
createdAt?: boolean
|
||||
home?: boolean | Prisma.MihomeHomeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["mihomeDevice"]>
|
||||
|
||||
export type MihomeDeviceSelectScalar = {
|
||||
id?: boolean
|
||||
@@ -1230,6 +1263,12 @@ export type MihomeDeviceInclude<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
hours?: boolean | Prisma.MihomeDevice$hoursArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.MihomeDeviceCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type MihomeDeviceIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
home?: boolean | Prisma.MihomeHomeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type MihomeDeviceIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
home?: boolean | Prisma.MihomeHomeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $MihomeDevicePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "MihomeDevice"
|
||||
@@ -1373,6 +1412,30 @@ export interface MihomeDeviceDelegate<ExtArgs extends runtime.Types.Extensions.I
|
||||
*/
|
||||
createMany<T extends MihomeDeviceCreateManyArgs>(args?: Prisma.SelectSubset<T, MihomeDeviceCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
||||
|
||||
/**
|
||||
* Create many MihomeDevices and returns the data saved in the database.
|
||||
* @param {MihomeDeviceCreateManyAndReturnArgs} args - Arguments to create many MihomeDevices.
|
||||
* @example
|
||||
* // Create many MihomeDevices
|
||||
* const mihomeDevice = await prisma.mihomeDevice.createManyAndReturn({
|
||||
* data: [
|
||||
* // ... provide data here
|
||||
* ]
|
||||
* })
|
||||
*
|
||||
* // Create many MihomeDevices and only return the `id`
|
||||
* const mihomeDeviceWithIdOnly = await prisma.mihomeDevice.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 MihomeDeviceCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, MihomeDeviceCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MihomeDevicePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
|
||||
|
||||
/**
|
||||
* Delete a MihomeDevice.
|
||||
* @param {MihomeDeviceDeleteArgs} args - Arguments to delete one MihomeDevice.
|
||||
@@ -1437,6 +1500,36 @@ export interface MihomeDeviceDelegate<ExtArgs extends runtime.Types.Extensions.I
|
||||
*/
|
||||
updateMany<T extends MihomeDeviceUpdateManyArgs>(args: Prisma.SelectSubset<T, MihomeDeviceUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
||||
|
||||
/**
|
||||
* Update zero or more MihomeDevices and returns the data updated in the database.
|
||||
* @param {MihomeDeviceUpdateManyAndReturnArgs} args - Arguments to update many MihomeDevices.
|
||||
* @example
|
||||
* // Update many MihomeDevices
|
||||
* const mihomeDevice = await prisma.mihomeDevice.updateManyAndReturn({
|
||||
* where: {
|
||||
* // ... provide filter here
|
||||
* },
|
||||
* data: [
|
||||
* // ... provide data here
|
||||
* ]
|
||||
* })
|
||||
*
|
||||
* // Update zero or more MihomeDevices and only return the `id`
|
||||
* const mihomeDeviceWithIdOnly = await prisma.mihomeDevice.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 MihomeDeviceUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, MihomeDeviceUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MihomeDevicePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
|
||||
|
||||
/**
|
||||
* Create or update one MihomeDevice.
|
||||
* @param {MihomeDeviceUpsertArgs} args - Arguments to update or create a MihomeDevice.
|
||||
@@ -1882,6 +1975,29 @@ export type MihomeDeviceCreateManyArgs<ExtArgs extends runtime.Types.Extensions.
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* MihomeDevice createManyAndReturn
|
||||
*/
|
||||
export type MihomeDeviceCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the MihomeDevice
|
||||
*/
|
||||
select?: Prisma.MihomeDeviceSelectCreateManyAndReturn<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the MihomeDevice
|
||||
*/
|
||||
omit?: Prisma.MihomeDeviceOmit<ExtArgs> | null
|
||||
/**
|
||||
* The data used to create many MihomeDevices.
|
||||
*/
|
||||
data: Prisma.MihomeDeviceCreateManyInput | Prisma.MihomeDeviceCreateManyInput[]
|
||||
skipDuplicates?: boolean
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.MihomeDeviceIncludeCreateManyAndReturn<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* MihomeDevice update
|
||||
*/
|
||||
@@ -1926,6 +2042,36 @@ export type MihomeDeviceUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* MihomeDevice updateManyAndReturn
|
||||
*/
|
||||
export type MihomeDeviceUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the MihomeDevice
|
||||
*/
|
||||
select?: Prisma.MihomeDeviceSelectUpdateManyAndReturn<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the MihomeDevice
|
||||
*/
|
||||
omit?: Prisma.MihomeDeviceOmit<ExtArgs> | null
|
||||
/**
|
||||
* The data used to update MihomeDevices.
|
||||
*/
|
||||
data: Prisma.XOR<Prisma.MihomeDeviceUpdateManyMutationInput, Prisma.MihomeDeviceUncheckedUpdateManyInput>
|
||||
/**
|
||||
* Filter which MihomeDevices to update
|
||||
*/
|
||||
where?: Prisma.MihomeDeviceWhereInput
|
||||
/**
|
||||
* Limit how many MihomeDevices to update.
|
||||
*/
|
||||
limit?: number
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.MihomeDeviceIncludeUpdateManyAndReturn<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* MihomeDevice upsert
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user