# Database creation during build in V2 issue

**URL:** <https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004>\
**Category:** Bugs\
**Tags:** database, workspace, agent\
**Created:** [March 6, 2025, 9:02pm UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004 "2025-03-06T21:02:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/mark/32/196_2.png) [@mark](https://replit.discourse.group/u/mark)\
**Post date:** [March 6, 2025, 9:02pm UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/1 "2025-03-06T21:02:52Z")

</div>

Thought I’d share here for visibility and also to see if anyone else has experienced. If you have tips as well, and this is by design, I’m all ears!

I’ve noticed in V2 recently that typically when you create a brand new app with Agent usually, even when you check the box to create a Postgres database, the Agent will build the prototype and then will skip the step of adding a database.

Then when you go in later to add the database it spends multiple checkpoints to try to retrofit the database into the app, often having to loop through correcting errors it finds along the way.

To me it would be more efficient time and cost to add the database during the initial build, especially when you select the database during initial build.

Thanks!

---

<div class="post-metadata">

**Author:** ![pmz](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/pmz/32/381_2.png) [@pmz](https://replit.discourse.group/u/pmz)\
**Post date:** [March 6, 2025, 9:09pm UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/2 "2025-03-06T21:09:10Z")

</div>

I have noticed this to. The agent will build a working prototype using in-memory storage or something else and not include the database. You then have to then tell it to configure the database.

---

<div class="post-metadata">

**Author:** ![mark](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/mark/32/196_2.png) [@mark](https://replit.discourse.group/u/mark)\
**Post date:** [March 12, 2025, 8:08pm UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/3 "2025-03-12T20:08:07Z")

</div>

I still continue to see this, even with brand new apps I’m creating in V2, where I’ve selected database during initial build of prototype.

---

<div class="post-metadata">

**Author:** ![hypler](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/hypler/32/483_2.png) [@hypler](https://replit.discourse.group/u/hypler)\
**Post date:** [March 12, 2025, 8:32pm UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/4 "2025-03-12T20:32:14Z")

</div>

I had an issue with the database getting HUGE, I mean 900gb huge and got a huge bill. They resolved the invoice for me thankfully but the charges were thankfully rejected by my bank while they resolved it. I think there are some bugs in V2, I’m using it more cautiously this month.

---

<div class="post-metadata">

**Author:** ![mark](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/mark/32/196_2.png) [@mark](https://replit.discourse.group/u/mark)\
**Post date:** [March 13, 2025, 12:20am UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/5 "2025-03-13T00:20:29Z")

</div>

I’m glad the issue has been resolved for you!

---

<div class="post-metadata">

**Author:** ![hypler](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/hypler/32/483_2.png) [@hypler](https://replit.discourse.group/u/hypler)\
**Post date:** [March 13, 2025, 2:42am UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/6 "2025-03-13T02:42:23Z")

</div>

Yeah you’re telling me, seeing the “Chase fraud blocked a $1595 charge from Replit” definitely took me by surprise. I don’t mind paying if I am using the data but I had hard limits set at $450 which I thought would be plenty since I’m not even live yet, I have been hitting the checkpoints hard and expected around $250-$450 per month in usage but for sure not $1500+

---

<div class="post-metadata">

**Author:** ![realfunnyeric](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/realfunnyeric/32/2150_2.png) [@realfunnyeric](https://replit.discourse.group/u/realfunnyeric)\
**Post date:** [March 13, 2025, 2:53am UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/7 "2025-03-13T02:53:30Z")

</div>

Awesome they took care of it. Not that they had a choice, would have been an easy dispute with the bank and then they have to pay for it AND pay a dispute fee.

But still, good of them to do the right thing all the same.

---

<div class="post-metadata">

**Author:** ![danquiroz](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/danquiroz/32/200_2.png) [@danquiroz](https://replit.discourse.group/u/danquiroz)\
**Post date:** [March 13, 2025, 6:52am UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/8 "2025-03-13T06:52:01Z")

</div>

Mark, when you spec out a new app, don’t check the checkbox for PostgreSQL database. Instead, when the pre-build summary comes up insist that the initial build includes PostgreSQL database and it will add the database on the maiden build specification. Trust me I went through what you’re going through the hard way and had to scrap many an app before I figured this out. They use to default the addition of the PostgreSQL database but they discontinued the practice (I’m sure they had a good reason) and caused a lot of trouble for my builds.

---

<div class="post-metadata">

**Author:** ![mark](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/mark/32/196_2.png) [@mark](https://replit.discourse.group/u/mark)\
**Post date:** [March 13, 2025, 1:46pm UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/9 "2025-03-13T13:46:57Z")

</div>

Thanks @danquiroz - I will try your method. Hope the Replit team sees this thread as well and can remove/fix the PostgresDB option during initial build prototype as it creates unnecessary checkpoints later.

---

<div class="post-metadata">

**Author:** ![kody-replit](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/kody-replit/32/3_2.png) [@kody-replit](https://replit.discourse.group/u/kody-replit)\
**Post date:** [March 13, 2025, 10:59pm UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/10 "2025-03-13T22:59:09Z")

</div>

Hey this is an intentional action for the initial build because users were complaining that Agent was too jumpy to provision a database when they didn’t need or want one, so we made it so you have to explicitly ask it as a follow on. With Agent v2 since the initial build takes so long there’s discussion now about whether we add it back as part of the initial build, if you have strong opinions either way let us know. Torrent of users complaining about it doing the database during initial build was what made us initially separate it out.

---

<div class="post-metadata">

**Author:** ![mark](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/mark/32/196_2.png) [@mark](https://replit.discourse.group/u/mark)\
**Post date:** [March 13, 2025, 11:40pm UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/11 "2025-03-13T23:40:35Z")

</div>

Thanks Kody! How you described it makes sense.

If it is by design, recommend training V2+ of Agent to _not_ give option during initial build to add a database, and to consider flagging to end user something like, ‘if you want a database’ ask Agent to add it in.

Or another idea, have a ‘force’ add database button with V2+ of Agent to say, yes, I _really_ do want to add a database.

---

<div class="post-metadata">

**Author:** ![kody-replit](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/kody-replit/32/3_2.png) [@kody-replit](https://replit.discourse.group/u/kody-replit)\
**Post date:** [March 14, 2025, 12:09am UTC](https://replit.discourse.group/t/database-creation-during-build-in-v2-issue/4004/12 "2025-03-14T00:09:32Z")

</div>

Yeah we’re redoing a lot of that as part of lobby (planning step before kicking off build) but that’s slower rolling out than expected, will see if there’s a hotfix or something we can add. Think there’s already an “add a database” next step recommendation but not sure if that’s rolled widely yet
