feat(0.2.1): M1 数据库迁移 PostgreSQL —— schema 切 pg, 任务域六表加 uuid, 项目 code/任务 number, db.js 切 adapter-pg, 重建 PG 基线迁移; 附实施方案文档
This commit is contained in:
@@ -348,7 +348,6 @@ export type MihomeEnvSampleOrderByWithRelationInput = {
|
||||
raw?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
device?: Prisma.MihomeDeviceOrderByWithRelationInput
|
||||
_relevance?: Prisma.MihomeEnvSampleOrderByRelevanceInput
|
||||
}
|
||||
|
||||
export type MihomeEnvSampleWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -550,12 +549,6 @@ export type MihomeEnvSampleOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type MihomeEnvSampleOrderByRelevanceInput = {
|
||||
fields: Prisma.MihomeEnvSampleOrderByRelevanceFieldEnum | Prisma.MihomeEnvSampleOrderByRelevanceFieldEnum[]
|
||||
sort: Prisma.SortOrder
|
||||
search: string
|
||||
}
|
||||
|
||||
export type MihomeEnvSampleDeviceIdDateCompoundUniqueInput = {
|
||||
deviceId: number
|
||||
date: Date | string
|
||||
@@ -857,7 +850,43 @@ export type MihomeEnvSampleSelect<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
device?: boolean | Prisma.MihomeDeviceDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["mihomeEnvSample"]>
|
||||
|
||||
export type MihomeEnvSampleSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
deviceId?: boolean
|
||||
date?: boolean
|
||||
temperature?: boolean
|
||||
humidity?: boolean
|
||||
temperatureAvg?: boolean
|
||||
humidityAvg?: boolean
|
||||
temperatureMin?: boolean
|
||||
temperatureMax?: boolean
|
||||
humidityMin?: boolean
|
||||
humidityMax?: boolean
|
||||
origin?: boolean
|
||||
sampledAt?: boolean
|
||||
raw?: boolean
|
||||
createdAt?: boolean
|
||||
device?: boolean | Prisma.MihomeDeviceDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["mihomeEnvSample"]>
|
||||
|
||||
export type MihomeEnvSampleSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
deviceId?: boolean
|
||||
date?: boolean
|
||||
temperature?: boolean
|
||||
humidity?: boolean
|
||||
temperatureAvg?: boolean
|
||||
humidityAvg?: boolean
|
||||
temperatureMin?: boolean
|
||||
temperatureMax?: boolean
|
||||
humidityMin?: boolean
|
||||
humidityMax?: boolean
|
||||
origin?: boolean
|
||||
sampledAt?: boolean
|
||||
raw?: boolean
|
||||
createdAt?: boolean
|
||||
device?: boolean | Prisma.MihomeDeviceDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["mihomeEnvSample"]>
|
||||
|
||||
export type MihomeEnvSampleSelectScalar = {
|
||||
id?: boolean
|
||||
@@ -881,6 +910,12 @@ export type MihomeEnvSampleOmit<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
export type MihomeEnvSampleInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
device?: boolean | Prisma.MihomeDeviceDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type MihomeEnvSampleIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
device?: boolean | Prisma.MihomeDeviceDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type MihomeEnvSampleIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
device?: boolean | Prisma.MihomeDeviceDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $MihomeEnvSamplePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "MihomeEnvSample"
|
||||
@@ -1020,6 +1055,30 @@ export interface MihomeEnvSampleDelegate<ExtArgs extends runtime.Types.Extension
|
||||
*/
|
||||
createMany<T extends MihomeEnvSampleCreateManyArgs>(args?: Prisma.SelectSubset<T, MihomeEnvSampleCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
||||
|
||||
/**
|
||||
* Create many MihomeEnvSamples and returns the data saved in the database.
|
||||
* @param {MihomeEnvSampleCreateManyAndReturnArgs} args - Arguments to create many MihomeEnvSamples.
|
||||
* @example
|
||||
* // Create many MihomeEnvSamples
|
||||
* const mihomeEnvSample = await prisma.mihomeEnvSample.createManyAndReturn({
|
||||
* data: [
|
||||
* // ... provide data here
|
||||
* ]
|
||||
* })
|
||||
*
|
||||
* // Create many MihomeEnvSamples and only return the `id`
|
||||
* const mihomeEnvSampleWithIdOnly = await prisma.mihomeEnvSample.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 MihomeEnvSampleCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, MihomeEnvSampleCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MihomeEnvSamplePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
|
||||
|
||||
/**
|
||||
* Delete a MihomeEnvSample.
|
||||
* @param {MihomeEnvSampleDeleteArgs} args - Arguments to delete one MihomeEnvSample.
|
||||
@@ -1084,6 +1143,36 @@ export interface MihomeEnvSampleDelegate<ExtArgs extends runtime.Types.Extension
|
||||
*/
|
||||
updateMany<T extends MihomeEnvSampleUpdateManyArgs>(args: Prisma.SelectSubset<T, MihomeEnvSampleUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
||||
|
||||
/**
|
||||
* Update zero or more MihomeEnvSamples and returns the data updated in the database.
|
||||
* @param {MihomeEnvSampleUpdateManyAndReturnArgs} args - Arguments to update many MihomeEnvSamples.
|
||||
* @example
|
||||
* // Update many MihomeEnvSamples
|
||||
* const mihomeEnvSample = await prisma.mihomeEnvSample.updateManyAndReturn({
|
||||
* where: {
|
||||
* // ... provide filter here
|
||||
* },
|
||||
* data: [
|
||||
* // ... provide data here
|
||||
* ]
|
||||
* })
|
||||
*
|
||||
* // Update zero or more MihomeEnvSamples and only return the `id`
|
||||
* const mihomeEnvSampleWithIdOnly = await prisma.mihomeEnvSample.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 MihomeEnvSampleUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, MihomeEnvSampleUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MihomeEnvSamplePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
|
||||
|
||||
/**
|
||||
* Create or update one MihomeEnvSample.
|
||||
* @param {MihomeEnvSampleUpsertArgs} args - Arguments to update or create a MihomeEnvSample.
|
||||
@@ -1525,6 +1614,29 @@ export type MihomeEnvSampleCreateManyArgs<ExtArgs extends runtime.Types.Extensio
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* MihomeEnvSample createManyAndReturn
|
||||
*/
|
||||
export type MihomeEnvSampleCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the MihomeEnvSample
|
||||
*/
|
||||
select?: Prisma.MihomeEnvSampleSelectCreateManyAndReturn<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the MihomeEnvSample
|
||||
*/
|
||||
omit?: Prisma.MihomeEnvSampleOmit<ExtArgs> | null
|
||||
/**
|
||||
* The data used to create many MihomeEnvSamples.
|
||||
*/
|
||||
data: Prisma.MihomeEnvSampleCreateManyInput | Prisma.MihomeEnvSampleCreateManyInput[]
|
||||
skipDuplicates?: boolean
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.MihomeEnvSampleIncludeCreateManyAndReturn<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* MihomeEnvSample update
|
||||
*/
|
||||
@@ -1569,6 +1681,36 @@ export type MihomeEnvSampleUpdateManyArgs<ExtArgs extends runtime.Types.Extensio
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* MihomeEnvSample updateManyAndReturn
|
||||
*/
|
||||
export type MihomeEnvSampleUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the MihomeEnvSample
|
||||
*/
|
||||
select?: Prisma.MihomeEnvSampleSelectUpdateManyAndReturn<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the MihomeEnvSample
|
||||
*/
|
||||
omit?: Prisma.MihomeEnvSampleOmit<ExtArgs> | null
|
||||
/**
|
||||
* The data used to update MihomeEnvSamples.
|
||||
*/
|
||||
data: Prisma.XOR<Prisma.MihomeEnvSampleUpdateManyMutationInput, Prisma.MihomeEnvSampleUncheckedUpdateManyInput>
|
||||
/**
|
||||
* Filter which MihomeEnvSamples to update
|
||||
*/
|
||||
where?: Prisma.MihomeEnvSampleWhereInput
|
||||
/**
|
||||
* Limit how many MihomeEnvSamples to update.
|
||||
*/
|
||||
limit?: number
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.MihomeEnvSampleIncludeUpdateManyAndReturn<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* MihomeEnvSample upsert
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user