# DATABASE\_URL not available in release command

**URL:** <https://community.fly.io/t/database-url-not-available-in-release-command/17715>\
**Category:** Questions / Help\
**Tags:** postgres, django, login-only\
**Created:** [January 15, 2024, 11:58am UTC](https://community.fly.io/t/database-url-not-available-in-release-command/17715 "2024-01-15T11:58:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![czue](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/czue/32/7119_2.png) [@czue](https://community.fly.io/u/czue)\
**Post date:** [January 15, 2024, 11:58am UTC](https://community.fly.io/t/database-url-not-available-in-release-command/17715/1 "2024-01-15T11:58:08Z")

</div>

I have previously been able to use `DATABASE_URL` in my Django app to run my database migrations. This still appears to work for my existing apps, however when I add a new app it’s not working. As best I can tell `DATABASE_URL` is not being set in my environment. This means that migrations obviously fail, since they can’t find the right database.

I am loading the environment variables directly from Django / Python, in case that matters. I saw [this issue](https://community.fly.io/t/using-env-variables-in-release-command/7186) but it didn’t seem related.

---

<div class="post-metadata">

**Author:** ![czue](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/czue/32/7119_2.png) [@czue](https://community.fly.io/u/czue)\
**Post date:** [January 15, 2024, 12:29pm UTC](https://community.fly.io/t/database-url-not-available-in-release-command/17715/2 "2024-01-15T12:29:18Z")

</div>

Update: I think this is actually just because the DB didn’t provision/attach properly. Sorry about the false alarm!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [January 22, 2024, 12:29pm UTC](https://community.fly.io/t/database-url-not-available-in-release-command/17715/3 "2024-01-22T12:29:59Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
