Skip to content

Commit

Permalink
fix(api): Policy isDraft field
Browse files Browse the repository at this point in the history
  • Loading branch information
hbriese committed Jul 28, 2024
1 parent 24bf632 commit c926b60
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 150 deletions.
2 changes: 1 addition & 1 deletion api/dbschema/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ configure instance set query_work_mem := <cfg::memory>"8MiB";
configure instance set shared_buffers := <cfg::memory>"2GiB";

# Total memory available to the database for caching - 75%
configure instance set effective_cache_size := <cfg::memory>"3GiB";
configure instance set effective_cache_size := <cfg::memory>"6GiB";
140 changes: 70 additions & 70 deletions api/dbschema/edgeql-js/__spec__.ts

Large diffs are not rendered by default.

152 changes: 76 additions & 76 deletions api/dbschema/edgeql-js/modules/default.ts

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions api/dbschema/migrations/00002-m1ob6ar.edgeql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CREATE MIGRATION m1ob6arfwyamzcpgk2hgzhby3iwv3moewthqacorsw2mtyjkopdoaq
ONTO m13qxppnkqofigih7dxkipm2lh6k3ahrqerachqhdzihw76nb6i3aa
{
ALTER TYPE default::PolicyState {
ALTER PROPERTY isDraft {
USING ((__source__ ?= .draft));
};
};
};
4 changes: 2 additions & 2 deletions api/dbschema/policy.esdl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module default {
required initState := .activationBlock ?= 0;
required hasBeenActive := exists .activationBlock;
required isActive := .isLatest and .hasBeenActive;
required isDraft := exists .draft;
required isDraft := (__source__ ?= .draft);
latest := (__source__ if .isLatest else latestPolicy(.account, .key));
draft := assert_single((
with account := __source__.account, key := __source__.key
Expand Down Expand Up @@ -94,9 +94,9 @@ module default {
}

type TransfersConfig {
multi limits: TransferLimit { constraint exclusive; }
required defaultAllow: bool { default := true; };
required budget: uint32;
multi limits: TransferLimit { constraint exclusive; }
}

type TransferLimit {
Expand Down
2 changes: 1 addition & 1 deletion api/edgedb.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[edgedb]
server-version = "5.4"
server-version = "5.6"

0 comments on commit c926b60

Please sign in to comment.