Skip to content

Commit 6c844ba

Browse files
committed
Add some comment
1 parent 67df9e5 commit 6c844ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

coderd/database/spice/spice.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,15 @@ func DB(ctx context.Context) error {
7474

7575
func newServer(ctx context.Context) (server.RunnableServer, error) {
7676
ds, err := datastore.NewDatastore(ctx,
77-
datastore.WithEngine(datastore.PostgresEngine),
7877
datastore.DefaultDatastoreConfig().ToOption(),
78+
datastore.WithEngine(datastore.PostgresEngine),
7979
datastore.WithRequestHedgingEnabled(false),
80+
// must run migrations first
81+
// spicedb migrate --datastore-engine=postgres --datastore-conn-uri "postgres://postgres:postgres@localhost:5432/spicedb?sslmode=disable" head
82+
datastore.WithURI(`postgres://postgres:postgres@localhost:5432/spicedb?sslmode=disable`),
8083
)
8184
if err != nil {
82-
log.Fatalf("unable to start memdb datastore: %s", err)
85+
log.Fatalf("unable to start postgres datastore: %s", err)
8386
}
8487

8588
configOpts := []server.ConfigOption{

0 commit comments

Comments
 (0)