Skip to content

Commit cc8eaec

Browse files
committed
fix: use plain dbfork commands in demo
1 parent a1b8024 commit cc8eaec

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

media/dbfork-demo.gif

-153 Bytes
Loading

scripts/generate-demo.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ intro() {
117117
export HOME="\$demo_home"
118118
export GOPATH="\$demo_home/go"
119119
export GOMODCACHE="\$demo_home/go/pkg/mod"
120+
export PATH="$demo_work:\$PATH"
120121
mkdir -p "\$GOMODCACHE"
121122
122123
cd "\$repo_root"
@@ -128,21 +129,21 @@ run_command "docker compose up -d" 1
128129
run_command "until docker exec dbfork-postgres pg_isready -U postgres -d myapp_development >/dev/null 2>&1; do sleep 1; done" 0.5
129130
130131
section "Initialize dbfork"
131-
run_command "printf 'localhost\\\\n5432\\\\npostgres\\\\npostgres\\\\nmyapp_development\\\\n' | \$demo_bin init" 1.5
132+
run_command "printf 'localhost\\\\n5432\\\\npostgres\\\\npostgres\\\\nmyapp_development\\\\n' | dbfork init" 1.5
132133
133134
section "Seed the source database"
134135
run_command "docker exec dbfork-postgres psql -v ON_ERROR_STOP=1 -U postgres -d myapp_development -c \\\"DROP TABLE IF EXISTS users; CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT NOT NULL);\\\"" 1.5
135136
136137
section "Create and inspect a branch"
137-
run_command "\$demo_bin create feature-add-users" 1.5
138-
run_command "\$demo_bin list" 1.5
138+
run_command "dbfork create feature-add-users" 1.5
139+
run_command "dbfork list" 1.5
139140
140141
section "Change the branch schema"
141142
run_command "docker exec dbfork-postgres psql -v ON_ERROR_STOP=1 -U postgres -d dbfork_feature_add_users -c \\\"ALTER TABLE users ADD COLUMN email TEXT;\\\"" 1.5
142-
run_command "\$demo_bin diff feature-add-users" 2.5
143+
run_command "dbfork diff feature-add-users" 2.5
143144
144145
section "Clean up"
145-
run_command "\$demo_bin drop feature-add-users --force" 2
146+
run_command "dbfork drop feature-add-users --force" 2
146147
EOF
147148

148149
chmod +x "$session_script"

0 commit comments

Comments
 (0)