Other runtimes: the equivalent Postgres client for your language
When one is found, a database is provisioned before your first deployment
finishes, and its connection string is injected as DATABASE_URL.
Provisioning is idempotent per application. Redeploying reuses the existing
database rather than creating a second one; your data survives every deploy.
Using it
You never hardcode credentials. Read DATABASE_URL from the environment:
import postgres from "postgres";const sql = postgres(process.env.DATABASE_URL);const users = await sql`SELECT * FROM users`;
Prisma, Drizzle, SQLAlchemy and Django all read DATABASE_URL from the
environment by default, so they need no extra configuration.
Bringing your own database
If your code already uses Supabase, Neon, Firebase or another hosted database,
Antideploy notices and does not create a second one. It carries your
existing credentials across instead.Set the connection string as an environment variable and it is injected at
release, taking precedence over anything Antideploy would have provisioned.
Environment variables
Supplying your own connection string.
Browsing your data
The dashboard includes a read-only browser for your application’s database
(tables, columns, and row counts), so you can confirm a migration landed
without connecting a client.This works both for databases Antideploy provisioned and for a Postgres URL
you supplied yourself.
Migrations
If your project has a migration step, Antideploy runs it as part of the
deploy, before the new version starts serving. A failed migration fails the
deploy rather than releasing a version your schema cannot support.
Lifecycle
The database belongs to the application. Deleting the application deletes the
database and everything in it.
Deletion is permanent. Antideploy does not expose backups, snapshots or
point-in-time restore; if you need a copy of your data, take one yourself
with pg_dump before deleting an application.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Antideploy","colors":{"primary":"#ef7025","light":"#eec9bc","dark":"#4fa1ab"},"favicon":"https://mintcdn.com/antideploy/eXQ8eu4Iwz1gypfi/favicon.svg?fit=max\u0026auto=format\u0026n=eXQ8eu4Iwz1gypfi\u0026q=85\u0026s=c3e43b693377581e33031c20a7d8e056","navbar":{"links":[{"href":"mailto:support@antideploy.com","label":"Support"}],"primary":{"type":"button","label":"Get Started","href":"https://antideploy.com/login"}},"footer":{"socials":{"x":"https://x.com/antideploy","github":"https://github.com/antideploy"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"antideploy","hasAudioNarration":false,"actualSubdomain":"antideploy","customDomains":["antideploy.com"],"gitSource":{"type":"github","owner":"akkshattshah","repo":"antideploymintlify","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af5968104140d5ce9d62547","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Documentation","count":25},{"language":"default","tag":"Guides","count":6},{"language":"default","tag":"Account","count":4},{"language":"default","tag":"API Reference","count":4},{"language":"default","tag":"API","count":4},{"language":"default","tag":"Deploying Apps","count":4},{"language":"default","tag":"Get Started","count":3},{"language":"default","tag":"Infrastructure","count":3},{"language":"default","tag":"Operations","count":3},{"language":"default","tag":"Configuration","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"infrastructure/databases","slug":"/infrastructure/databases","pageMetadata":{"title":"Managed PostgreSQL: Provisioning and Connections","description":"Antideploy provisions PostgreSQL automatically when your code uses it, and injects the connection string as DATABASE_URL.","href":"/infrastructure/databases"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Antideploy provisions PostgreSQL automatically when your code uses it, and injects the connection string as DATABASE_URL.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Card,CodeBlock,Heading,Note,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`If your project uses Postgres, Antideploy creates one for you. You do not\nchoose a plan, a size, or a region.`}),`\n`,_jsx(Heading,{level:`2`,id:`when-a-database-is-created`,children:`When a database is created`}),`\n`,_jsx(_components.p,{children:`During analysis, Antideploy looks for evidence that your code talks to\nPostgres, an ORM or a driver in your dependencies:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Node`}),`: Prisma, Drizzle, TypeORM, Sequelize, Knex, `,_jsx(_components.code,{children:`pg`}),`, `,_jsx(_components.code,{children:`postgres`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Python`}),`: SQLAlchemy, Django ORM, `,_jsx(_components.code,{children:`psycopg2`}),`, `,_jsx(_components.code,{children:`asyncpg`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Other runtimes`}),`: the equivalent Postgres client for your language`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`When one is found, a database is provisioned before your first deployment\nfinishes, and its connection string is injected as `,_jsx(_components.code,{children:`DATABASE_URL`}),`.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Provisioning is idempotent per application. Redeploying reuses the existing\ndatabase rather than creating a second one; your data survives every deploy.`})}),`\n`,_jsx(Heading,{level:`2`,id:`using-it`,children:`Using it`}),`\n`,_jsxs(_components.p,{children:[`You never hardcode credentials. Read `,_jsx(_components.code,{children:`DATABASE_URL`}),` from the environment:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` postgres`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"postgres\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sql`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` postgres`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`DATABASE_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` users`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sql`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`SELECT * FROM users`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os, psycopg2`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`conn `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` psycopg2.connect(os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"DATABASE_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Prisma, Drizzle, SQLAlchemy and Django all read `,_jsx(_components.code,{children:`DATABASE_URL`}),` from the\nenvironment by default, so they need no extra configuration.`]}),`\n`,_jsx(Heading,{level:`2`,id:`bringing-your-own-database`,children:`Bringing your own database`}),`\n`,_jsxs(_components.p,{children:[`If your code already uses Supabase, Neon, Firebase or another hosted database,\nAntideploy notices and `,_jsx(_components.strong,{children:`does not`}),` create a second one. It carries your\nexisting credentials across instead.`]}),`\n`,_jsx(_components.p,{children:`Set the connection string as an environment variable and it is injected at\nrelease, taking precedence over anything Antideploy would have provisioned.`}),`\n`,_jsx(Card,{title:`Environment variables`,icon:`key`,href:`/configuration/environment-variables`,children:_jsx(_components.p,{children:`Supplying your own connection string.`})}),`\n`,_jsx(Heading,{level:`2`,id:`browsing-your-data`,children:`Browsing your data`}),`\n`,_jsx(_components.p,{children:`The dashboard includes a read-only browser for your application’s database\n(tables, columns, and row counts), so you can confirm a migration landed\nwithout connecting a client.`}),`\n`,_jsx(_components.p,{children:`This works both for databases Antideploy provisioned and for a Postgres URL\nyou supplied yourself.`}),`\n`,_jsx(Heading,{level:`2`,id:`migrations`,children:`Migrations`}),`\n`,_jsx(_components.p,{children:`If your project has a migration step, Antideploy runs it as part of the\ndeploy, before the new version starts serving. A failed migration fails the\ndeploy rather than releasing a version your schema cannot support.`}),`\n`,_jsx(Heading,{level:`2`,id:`lifecycle`,children:`Lifecycle`}),`\n`,_jsx(_components.p,{children:`The database belongs to the application. Deleting the application deletes the\ndatabase and everything in it.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Deletion is permanent. Antideploy does not expose backups, snapshots or\npoint-in-time restore; if you need a copy of your data, take one yourself\nwith `,_jsx(_components.code,{children:`pg_dump`}),` before deleting an application.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Managed PostgreSQL: Provisioning and Connections","description":"Antideploy provisions PostgreSQL automatically when your code uses it, and injects the connection string as DATABASE_URL.","href":"/infrastructure/databases"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"When a database is created","slug":"when-a-database-is-created","depth":2,"children":[]},{"title":"Using it","slug":"using-it","depth":2,"children":[]},{"title":"Bringing your own database","slug":"bringing-your-own-database","depth":2,"children":[]},{"title":"Browsing your data","slug":"browsing-your-data","depth":2,"children":[]},{"title":"Migrations","slug":"migrations","depth":2,"children":[]},{"title":"Lifecycle","slug":"lifecycle","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"antideploy","siteName":"Antideploy","title":"Managed PostgreSQL: Provisioning and Connections - Antideploy","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-20T09:04:33.055Z","originalFileLocation":"infrastructure/databases.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Antideploy provisions PostgreSQL automatically when your code uses it, and injects the connection string as DATABASE_URL.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Antideploy\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Managed PostgreSQL: Provisioning and Connections - Antideploy\">\u003cmeta data-mint-head property=\"og:description\" content=\"Antideploy provisions PostgreSQL automatically when your code uses it, and injects the connection string as DATABASE_URL.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Antideploy\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://antideploy.com/docs/infrastructure/databases\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://antideploy.mintlify.site/docs/_mintlify/api/og/v2?division=Infrastructure\u0026amp;title=Managed+PostgreSQL%3A+Provisioning+and+Connections\u0026amp;description=Antideploy+provisions+PostgreSQL+automatically+when+your+code+uses+it%2C+and+injects+the+connection+string+as+DATABASE_URL.\u0026amp;theme=c2f844e4eb2bbb817b1fc1a7\u0026amp;signature=24356b6af092f4d49756ccfc2f556563945617184366f7fcc09bbef7d3ae579e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Managed PostgreSQL: Provisioning and Connections - Antideploy\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Antideploy provisions PostgreSQL automatically when your code uses it, and injects the connection string as DATABASE_URL.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://antideploy.mintlify.site/docs/_mintlify/api/og/v2?division=Infrastructure\u0026amp;title=Managed+PostgreSQL%3A+Provisioning+and+Connections\u0026amp;description=Antideploy+provisions+PostgreSQL+automatically+when+your+code+uses+it%2C+and+injects+the+connection+string+as+DATABASE_URL.\u0026amp;theme=c2f844e4eb2bbb817b1fc1a7\u0026amp;signature=24356b6af092f4d49756ccfc2f556563945617184366f7fcc09bbef7d3ae579e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/antideploy/miJTC10xeqk9G-u5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Antideploy\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ef7025\">\u003clink data-mint-head rel=\"canonical\" href=\"https://antideploy.com/docs/infrastructure/databases\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/infrastructure/databases.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://antideploy.com/#organization\",\"name\":\"Antideploy\",\"url\":\"https://antideploy.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://antideploy.com/docs#website\",\"name\":\"Antideploy\",\"url\":\"https://antideploy.com/docs\",\"publisher\":{\"@id\":\"https://antideploy.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://antideploy.com/docs/infrastructure/databases#webpage\",\"url\":\"https://antideploy.com/docs/infrastructure/databases\",\"name\":\"Managed PostgreSQL: Provisioning and Connections\",\"description\":\"Antideploy provisions PostgreSQL automatically when your code uses it, and injects the connection string as DATABASE_URL.\",\"dateModified\":\"2026-08-20T09:04:33.055Z\",\"isPartOf\":{\"@id\":\"https://antideploy.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://antideploy.com/docs/infrastructure/databases#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://antideploy.com/docs/infrastructure/databases#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Infrastructure\",\"item\":\"https://antideploy.com/docs/infrastructure/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Managed PostgreSQL: Provisioning and Connections\",\"item\":\"https://antideploy.com/docs/infrastructure/databases\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://antideploy.com/docs/infrastructure/databases#article\",\"headline\":\"Managed PostgreSQL: Provisioning and Connections\",\"name\":\"Managed PostgreSQL: Provisioning and Connections\",\"description\":\"Antideploy provisions PostgreSQL automatically when your code uses it, and injects the connection string as DATABASE_URL.\",\"url\":\"https://antideploy.com/docs/infrastructure/databases\",\"mainEntityOfPage\":{\"@id\":\"https://antideploy.com/docs/infrastructure/databases#webpage\"},\"dateModified\":\"2026-08-20T09:04:33.055Z\",\"publisher\":{\"@id\":\"https://antideploy.com/#organization\"},\"isPartOf\":{\"@id\":\"https://antideploy.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Antideploy\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Antideploy\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/infrastructure/databases.md","siteName":"Antideploy","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Antideploy: Deploy Any App Without Configuring Infrastructure","href":"/introduction"},{"title":"Get Your First App Live in 5 Minutes","href":"/quickstart"},{"title":"How Antideploy Analyzes Your Code and Deploys It","href":"/how-it-works"}]},{"group":"Deploying Apps","pages":[{"title":"Deploy from GitHub","sidebarTitle":"GitHub","href":"/deploying/github"},{"title":"Deploy by Uploading a Folder","sidebarTitle":"Upload","href":"/deploying/upload"},{"title":"Deploy from a Coding Agent","sidebarTitle":"Coding agent (MCP)","href":"/deploying/mcp"},{"title":"Publish a Website from Claude","sidebarTitle":"Claude connector","href":"/deploying/claude-connector"},{"title":"Terminal Login: Deploy Without Opening a Browser","sidebarTitle":"Terminal login","href":"/api/terminal-login"},{"title":"Deploy from the CLI or an AI Agent","href":"/api/deploy"}]},{"group":"Infrastructure","pages":[{"title":"Infrastructure Antideploy Provisions for You","href":"/infrastructure/overview"},{"title":"Managed Compute: Containers and Scale-to-Zero","description":"How Antideploy runs your app: container sizing, cold starts, and the single-instance limit.","href":"/infrastructure/compute"},{"title":"Managed PostgreSQL: Provisioning and Connections","href":"/infrastructure/databases"}]},{"group":"Operations","pages":[{"title":"Health Checks, Metrics and Downtime Email","sidebarTitle":"Monitoring","description":"Antideploy checks every deployed app about every five minutes, emails you when one goes down or recovers, and reports its requests, errors and response times.","href":"/operations/monitoring"},{"title":"Application Logs","sidebarTitle":"Logs","href":"/operations/logs"},{"title":"Deployment History","sidebarTitle":"Deployments","href":"/operations/deployments"}]},{"group":"Configuration","pages":[{"title":"Environment Variables","href":"/configuration/environment-variables"},{"title":"Secrets and Credentials","sidebarTitle":"Secrets","href":"/configuration/secrets"}]},{"group":"Guides","pages":[{"title":"Deploy Without a Dockerfile","sidebarTitle":"Without a Dockerfile","href":"/guides/deploy-without-a-dockerfile"},{"title":"Deploy an App With a Postgres Database","sidebarTitle":"With a database","href":"/guides/deploy-an-app-with-a-database"},{"title":"Why Did My Deployment Fail?","sidebarTitle":"Why a deploy failed","href":"/guides/why-did-my-deployment-fail"},{"title":"Undo a Bad Deploy","sidebarTitle":"Undoing a deploy","href":"/guides/roll-back-a-bad-deploy"},{"title":"Do I Need Kubernetes?","sidebarTitle":"Do I need Kubernetes?","href":"/guides/do-i-need-kubernetes"},{"title":"Cloud Run the Hard Way","sidebarTitle":"Cloud Run the hard way","href":"/guides/cloud-run-the-hard-way"}]},{"group":"Account","pages":[{"title":"Signing in","href":"/sign-in"},{"title":"AI API keys","href":"/ai-api-keys"},{"title":"Refer and Earn","href":"/referrals"},{"title":"What you can't deploy","href":"/acceptable-use"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api/overview"}]}]},"basePath":"","title":"Managed PostgreSQL: Provisioning and Connections - Antideploy","deploymentId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","buildId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","dynamics":[],"chunks":[]}