Skip to content

Commit ee54c80

Browse files
committed
Merge branch 'fix/example'
2 parents 3b5efa7 + b768a59 commit ee54c80

File tree

5 files changed

+20
-50
lines changed

5 files changed

+20
-50
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ Inside a directory create `trek.yaml`:
5353
```yaml
5454
model_name: <model_name>
5555
db_name: <db_name>
56-
db_users:
57-
- <db_user_1>
58-
- <db_user_2>
56+
roles:
57+
- name: db_user_1
58+
- name: db_user_2
5959
```
6060
6161
Create `<model_name>.dbm` using pgModeler.

example/foo.png

-2 Bytes
Loading

example/foo.sql

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
1-
-- Database generated with pgModeler (PostgreSQL Database Modeler).
2-
-- pgModeler version: 0.9.4
3-
-- PostgreSQL version: 13.0
4-
-- Project Site: pgmodeler.io
5-
-- Model Author: ---
6-
-- -- object: alice | type: ROLE --
7-
-- -- DROP ROLE IF EXISTS alice;
8-
-- CREATE ROLE alice WITH ;
9-
-- -- ddl-end --
10-
--
11-
-- -- object: bob | type: ROLE --
12-
-- -- DROP ROLE IF EXISTS bob;
13-
-- CREATE ROLE bob WITH ;
14-
-- -- ddl-end --
15-
--
1+
-- ** Database generated with pgModeler (PostgreSQL Database Modeler).
2+
-- ** pgModeler version: 1.2.2
3+
-- ** PostgreSQL version: 18.0
4+
-- ** Project Site: pgmodeler.io
5+
-- ** Model Author: ---
166

17-
-- Database creation must be performed outside a multi lined SQL file.
18-
-- These commands were put in this file only as a convenience.
19-
--
20-
-- -- object: bar | type: DATABASE --
21-
-- -- DROP DATABASE IF EXISTS bar;
22-
-- CREATE DATABASE bar;
23-
-- -- ddl-end --
24-
--
7+
SET search_path TO pg_catalog,public;
8+
-- ddl-end --
259

2610

example/migrations/001_init.up.sql

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
1-
-- Database generated with pgModeler (PostgreSQL Database Modeler).
2-
-- pgModeler version: 0.9.4
3-
-- PostgreSQL version: 13.0
4-
-- Project Site: pgmodeler.io
5-
-- Model Author: ---
6-
-- -- object: alice | type: ROLE --
7-
-- -- DROP ROLE IF EXISTS alice;
8-
-- CREATE ROLE alice WITH ;
9-
-- -- ddl-end --
10-
--
11-
-- -- object: bob | type: ROLE --
12-
-- -- DROP ROLE IF EXISTS bob;
13-
-- CREATE ROLE bob WITH ;
14-
-- -- ddl-end --
15-
--
1+
-- ** Database generated with pgModeler (PostgreSQL Database Modeler).
2+
-- ** pgModeler version: 1.2.2
3+
-- ** PostgreSQL version: 18.0
4+
-- ** Project Site: pgmodeler.io
5+
-- ** Model Author: ---
166

17-
-- Database creation must be performed outside a multi lined SQL file.
18-
-- These commands were put in this file only as a convenience.
19-
--
20-
-- -- object: bar | type: DATABASE --
21-
-- -- DROP DATABASE IF EXISTS bar;
22-
-- CREATE DATABASE bar;
23-
-- -- ddl-end --
24-
--
7+
SET search_path TO pg_catalog,public;
8+
-- ddl-end --
259

2610

generate-example.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ cd example
88
TREK_VERSION=latest \
99
TREK_MODEL_NAME=foo \
1010
TREK_DATABASE_NAME=bar \
11-
TREK_DATABASE_USERS=alice,bob \
11+
TREK_ROLES=alice,bob \
1212
go run .. init
1313

1414
go run .. check
15+
16+
go run .. generate --stdout

0 commit comments

Comments
 (0)