@@ -152,35 +152,37 @@ extension DependencyValues {
152152private let logger = Logger ( subsystem: " SyncUps " , category: " Database " )
153153
154154#if DEBUG
155- extension Database {
155+ extension DatabaseWriter {
156156 func seedSampleData( ) throws {
157- try seed {
158- SyncUp ( id: UUID ( 1 ) , seconds: 60 , theme: . appOrange, title: " Design " )
159- SyncUp ( id: UUID ( 2 ) , seconds: 60 * 10 , theme: . periwinkle, title: " Engineering " )
160- SyncUp ( id: UUID ( 3 ) , seconds: 60 * 30 , theme: . poppy, title: " Product " )
157+ try write { db in
158+ try db. seed {
159+ SyncUp ( id: UUID ( 1 ) , seconds: 60 , theme: . appOrange, title: " Design " )
160+ SyncUp ( id: UUID ( 2 ) , seconds: 60 * 10 , theme: . periwinkle, title: " Engineering " )
161+ SyncUp ( id: UUID ( 3 ) , seconds: 60 * 30 , theme: . poppy, title: " Product " )
161162
162- for name in [ " Blob " , " Blob Jr " , " Blob Sr " , " Blob Esq " , " Blob III " , " Blob I " ] {
163- Attendee . Draft ( name: name, syncUpID: UUID ( 1 ) )
164- }
165- for name in [ " Blob " , " Blob Jr " ] {
166- Attendee . Draft ( name: name, syncUpID: UUID ( 2 ) )
167- }
168- for name in [ " Blob Sr " , " Blob Jr " ] {
169- Attendee . Draft ( name: name, syncUpID: UUID ( 3 ) )
170- }
163+ for name in [ " Blob " , " Blob Jr " , " Blob Sr " , " Blob Esq " , " Blob III " , " Blob I " ] {
164+ Attendee . Draft ( name: name, syncUpID: UUID ( 1 ) )
165+ }
166+ for name in [ " Blob " , " Blob Jr " ] {
167+ Attendee . Draft ( name: name, syncUpID: UUID ( 2 ) )
168+ }
169+ for name in [ " Blob Sr " , " Blob Jr " ] {
170+ Attendee . Draft ( name: name, syncUpID: UUID ( 3 ) )
171+ }
171172
172- Meeting . Draft (
173- date: Date ( ) . addingTimeInterval ( - 60 * 60 * 24 * 7 ) ,
174- syncUpID: UUID ( 1 ) ,
175- transcript: """
176- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor \
177- incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud \
178- exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute \
179- irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla \
180- pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia \
181- deserunt mollit anim id est laborum.
182- """
183- )
173+ Meeting . Draft (
174+ date: Date ( ) . addingTimeInterval ( - 60 * 60 * 24 * 7 ) ,
175+ syncUpID: UUID ( 1 ) ,
176+ transcript: """
177+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor \
178+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud \
179+ exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute \
180+ irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla \
181+ pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia \
182+ deserunt mollit anim id est laborum.
183+ """
184+ )
185+ }
184186 }
185187 }
186188 }
0 commit comments