Skip to content

Commit 525baa3

Browse files
committed
Add diesel-cli to the buildpacks, don't drop schema_migrations
We'll want to drop `schema_migrations` sometime soonish, but for now let's make sure that everything just works. We don't want to incur downtime if we have to roll back.
1 parent 5082c78 commit 525baa3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.buildpacks

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ https://github.com/rcaught/heroku-buildpack-cmake#e4e2c9e
22
https://github.com/emk/heroku-buildpack-rust#035823
33
https://github.com/tonycoco/heroku-buildpack-ember-cli
44
https://github.com/ryandotsmith/nginx-buildpack.git#af813ba
5+
https://github.com/sgrif/heroku-buildpack-diesel#43267f2

src/bin/migrate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ fn main() {
3131
conn.execute("INSERT INTO __diesel_schema_migrations (
3232
SELECT version::text AS version, CURRENT_TIMESTAMP as run_on
3333
FROM schema_migrations
34-
)")?;
35-
conn.execute("DROP TABLE schema_migrations")
34+
) ON CONFLICT DO NOTHING")?;
3635
}).unwrap();
3736
}
3837

0 commit comments

Comments
 (0)