-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
82 lines (69 loc) · 3.96 KB
/
schema.prisma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// This file is automatically generated by Keystone, do not modify it manually.
// Modify your Keystone config when you want to change this.
datasource postgresql {
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
provider = "postgresql"
}
generator client {
provider = "prisma-client-js"
previewFeatures = ["postgresqlExtensions"]
extensions = [postgis(version: "3.5")]
}
model KeyValue_MapLayer {
id String @id @default(uuid()) @postgresql.Uuid
name String @default("")
description Json?
featurePropertySchema Json?
parentMapLayer KeyValue_MapLayer? @relation("KeyValue_MapLayer_parentMapLayer", fields: [parentMapLayerId], references: [id])
parentMapLayerId String? @map("parentMapLayer") @postgresql.Uuid
features KeyValue_MapFeature[] @relation("KeyValue_MapFeature_mapLayer")
from_KeyValue_MapLayer_parentMapLayer KeyValue_MapLayer[] @relation("KeyValue_MapLayer_parentMapLayer")
@@index([parentMapLayerId])
}
model KeyValue_MapFeature {
id String @id @default(uuid()) @postgresql.Uuid
mapLayer KeyValue_MapLayer? @relation("KeyValue_MapFeature_mapLayer", fields: [mapLayerId], references: [id])
mapLayerId String? @map("mapLayer") @postgresql.Uuid
name String @default("")
geometry_geometry Unsupported("GEOMETRY(Geometry, 4326)")?
geometry_geoJson Json?
properties Json?
from_KeyValue_MapFeatureProperty_mapFeature KeyValue_MapFeatureProperty[] @relation("KeyValue_MapFeatureProperty_mapFeature")
@@index([mapLayerId])
@@index([geometry_geometry], type: Gist)
}
model KeyValue_MapFeatureProperty {
id String @id @default(uuid()) @postgresql.Uuid
mapFeature KeyValue_MapFeature? @relation("KeyValue_MapFeatureProperty_mapFeature", fields: [mapFeatureId], references: [id])
mapFeatureId String? @map("mapFeature") @postgresql.Uuid
key String @default("")
type String?
value_text String @default("")
value_number Float?
@@index([mapFeatureId])
}
model Json_MapLayer {
id String @id @default(uuid()) @postgresql.Uuid
name String @default("")
description Json?
featurePropertySchema Json?
parentMapLayer Json_MapLayer? @relation("Json_MapLayer_parentMapLayer", fields: [parentMapLayerId], references: [id])
parentMapLayerId String? @map("parentMapLayer") @postgresql.Uuid
features Json_MapFeature[] @relation("Json_MapFeature_mapLayer")
from_Json_MapLayer_parentMapLayer Json_MapLayer[] @relation("Json_MapLayer_parentMapLayer")
@@index([parentMapLayerId])
}
model Json_MapFeature {
id String @id @default(uuid()) @postgresql.Uuid
mapLayer Json_MapLayer? @relation("Json_MapFeature_mapLayer", fields: [mapLayerId], references: [id])
mapLayerId String? @map("mapLayer") @postgresql.Uuid
name String @default("")
geometry_geometry Unsupported("GEOMETRY(Geometry, 4326)")?
geometry_geoJson Json?
properties Json?
@@index([mapLayerId])
@@index([name])
@@index([geometry_geometry], type: Gist)
@@index([properties], type: Gin)
}