# \#sqlite3

**URL:** https://forum.elixirforum.com/tag/sqlite3/913.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Generating \`schema\_migrations\` table automatically in Livebook with sqlite3](https://forum.elixirforum.com/t/generating-schema-migrations-table-automatically-in-livebook-with-sqlite3/63017)

<div class="topic-metadata">

**Author:** [@elbasti](https://forum.elixirforum.com/u/elbasti)\
**Replies:** 5\
**Last updated:** [March 18, 2026, 9:37pm UTC](https://forum.elixirforum.com/t/generating-schema-migrations-table-automatically-in-livebook-with-sqlite3/63017 "2026-03-18T21:37:34Z")

</div>

Hi everyone, I’m trying to run a LiveBook that uses ecto and sqlite. When I trun to run a migration, I get the following error: \*\* (Exqlite.Error) no such table: schema\_migrations. I suppose I could create the table …

---

## [Can't connect to an SQLite database with Dokku](https://forum.elixirforum.com/t/cant-connect-to-an-sqlite-database-with-dokku/73777)

<div class="topic-metadata">

**Author:** [@ostap](https://forum.elixirforum.com/u/ostap)\
**Replies:** 8\
**Last updated:** [December 30, 2025, 1:38pm UTC](https://forum.elixirforum.com/t/cant-connect-to-an-sqlite-database-with-dokku/73777 "2025-12-30T13:38:14Z")

</div>

Trying to put my app out in the wild. Received a Dockerfile from running mix phx.gen.release --docker Then on Dokku’s host I mounted a persistent directory and set the DATABASE\_PATH env: dokku config:set --no-restart …

---

## [How to set PRAGMA foreign\_keys=OFF in Ecto migration?](https://forum.elixirforum.com/t/how-to-set-pragma-foreign-keys-off-in-ecto-migration/64849)

<div class="topic-metadata">

**Author:** [@andreh](https://forum.elixirforum.com/u/andreh)\
**Replies:** 6\
**Last updated:** [September 10, 2025, 2:55pm UTC](https://forum.elixirforum.com/t/how-to-set-pragma-foreign-keys-off-in-ecto-migration/64849 "2025-09-10T14:55:28Z")

</div>

Hello, Using SQLite, in order to remove a NOT NULL constraint on a column, I’m trying to follow this procedure: https://www.sqlite.org/lang\_altertable.html#making\_other\_kinds\_of\_table\_schema\_changes The problem is, we …

---

## [Drops.Relation - High-Level Relation Abstraction on top of Ecto](https://forum.elixirforum.com/t/drops-relation-high-level-relation-abstraction-on-top-of-ecto/71899)

<div class="topic-metadata">

**Author:** [@solnic](https://forum.elixirforum.com/u/solnic)\
**Replies:** 0\
**Last updated:** [July 31, 2025, 6:56am UTC](https://forum.elixirforum.com/t/drops-relation-high-level-relation-abstraction-on-top-of-ecto/71899 "2025-07-31T06:56:32Z")

</div>

Hey folks, I’m back with a new library for y’all :slight\_smile: Gonna x-post from my blog: I’m excited to announce the latest addition to the Elixir Drops suite of libraries: Drops.Relation. This new library provides …

---

## [How to set the database path to load for use with Ecto, Sqlite3 after the program has started?](https://forum.elixirforum.com/t/how-to-set-the-database-path-to-load-for-use-with-ecto-sqlite3-after-the-program-has-started/70946)

<div class="topic-metadata">

**Author:** [@ohmyohmyohmy](https://forum.elixirforum.com/u/ohmyohmyohmy)\
**Replies:** 2\
**Last updated:** [May 20, 2025, 11:47am UTC](https://forum.elixirforum.com/t/how-to-set-the-database-path-to-load-for-use-with-ecto-sqlite3-after-the-program-has-started/70946 "2025-05-20T11:47:12Z")

</div>

On the website (GitHub - elixir-sqlite/ecto\_sqlite3: An Ecto SQLite3 adapter. · GitHub), it states that I have to set the database path in the config file: config :my\_app, ecto\_repos: \[MyApp.Repo\] config :my\_app, MyA…

---

## [Call SQL function when dumping custom Ecto type with SQLite and virtual table](https://forum.elixirforum.com/t/call-sql-function-when-dumping-custom-ecto-type-with-sqlite-and-virtual-table/67935)

<div class="topic-metadata">

**Author:** [@joelpaulkoch](https://forum.elixirforum.com/u/joelpaulkoch)\
**Replies:** 3\
**Last updated:** [January 21, 2025, 5:20pm UTC](https://forum.elixirforum.com/t/call-sql-function-when-dumping-custom-ecto-type-with-sqlite-and-virtual-table/67935 "2025-01-21T17:20:03Z")

</div>

I have a custom Ecto type and want to call a SQL function when dumping a value of this type into a virtual table with SQLite. I’m developing this library to use sqlite-vec with Elixir. There are 3 vector types in sqlit…

---

## [SQLite based app self hosted on VPS architecture & approach help needed](https://forum.elixirforum.com/t/sqlite-based-app-self-hosted-on-vps-architecture-approach-help-needed/68619)

<div class="topic-metadata">

**Author:** [@pelopo](https://forum.elixirforum.com/u/pelopo)\
**Replies:** 17\
**Last updated:** [January 10, 2025, 5:33pm UTC](https://forum.elixirforum.com/t/sqlite-based-app-self-hosted-on-vps-architecture-approach-help-needed/68619 "2025-01-10T17:33:47Z")

</div>

Hi, a newbie to web dev and Phoenix & Elixir here. I need advice on how to conceptually understand the topic of database updates and deployment from dev to prod for a SQLite based Liveview Web App. I’ve got a python b…

---

## [Using AshSqlite as "embedded" database](https://forum.elixirforum.com/t/using-ashsqlite-as-embedded-database/67199)

<div class="topic-metadata">

**Author:** [@jkwchui](https://forum.elixirforum.com/u/jkwchui)\
**Replies:** 1\
**Last updated:** [November 3, 2024, 9:30am UTC](https://forum.elixirforum.com/t/using-ashsqlite-as-embedded-database/67199 "2024-11-03T09:30:37Z")

</div>

I am learning AshSqlite and thought there is value in writing a tutorial, where one goes end-to-end in creating the .sqlite, load some data, define the Resources, and finally packaging the application (let’s call it Fact…

---

## [SQLite in Livebook using DbConnection smart cell](https://forum.elixirforum.com/t/sqlite-in-livebook-using-dbconnection-smart-cell/66255)

<div class="topic-metadata">

**Author:** [@l3nz](https://forum.elixirforum.com/u/l3nz)\
**Replies:** 2\
**Last updated:** [September 23, 2024, 9:11am UTC](https://forum.elixirforum.com/t/sqlite-in-livebook-using-dbconnection-smart-cell/66255 "2024-09-23T09:11:39Z")

</div>

I’m trying to use the DatabaseConnection smart cell in a livebook to query a SQLite database. When I connecti it, it says: {:ok, #PID\<0.293.0\>} But If I try creating a query it fails with {:error, :invalid\_connection…

---

## [Ash\_sqlite generated migrations](https://forum.elixirforum.com/t/ash-sqlite-generated-migrations/64545)

<div class="topic-metadata">

**Author:** [@benswift](https://forum.elixirforum.com/u/benswift)\
**Replies:** 5\
**Last updated:** [June 27, 2024, 10:09am UTC](https://forum.elixirforum.com/t/ash-sqlite-generated-migrations/64545 "2024-06-27T10:09:42Z")

</div>

Hey team I’m building a new ash phoenix app with a sqlite3\* backend (everything up-to-date, mix hex-outdated shows all green). Because I’m early in the development process my resources are changing a lot as I “explore t…

---

## [Ecto\_sqlite different read and write pools](https://forum.elixirforum.com/t/ecto-sqlite-different-read-and-write-pools/63588)

<div class="topic-metadata">

**Author:** [@tcoopman](https://forum.elixirforum.com/u/tcoopman)\
**Replies:** 5\
**Last updated:** [May 17, 2024, 11:22am UTC](https://forum.elixirforum.com/t/ecto-sqlite-different-read-and-write-pools/63588 "2024-05-17T11:22:03Z")

</div>

Context: I want to apply some of the recommendations specified in this article Optimizing SQLite for servers Specifically: 1 Write connection, multiple Read connections My thought on how to solve this was to use 2 diff…

---

## [Separate Sqlite Database per Customer?](https://forum.elixirforum.com/t/separate-sqlite-database-per-customer/54821)

<div class="topic-metadata">

**Author:** [@AndyL](https://forum.elixirforum.com/u/AndyL)\
**Replies:** 17\
**Last updated:** [December 24, 2023, 2:31pm UTC](https://forum.elixirforum.com/t/separate-sqlite-database-per-customer/54821 "2023-12-24T14:31:50Z")

</div>

I’m writing an app that manages sensitive data. It might be nice to segregate each customer’s data into a separate Sqlite database. I’ve done different flavors of multi-tenancy in Postgres, and have configured apps tha…

---

## [Anybody actually use Litestream (the SQLite backup/syncing layer) with Elixir?](https://forum.elixirforum.com/t/anybody-actually-use-litestream-the-sqlite-backup-syncing-layer-with-elixir/51139)

<div class="topic-metadata">

**Author:** [@mekusigjinn](https://forum.elixirforum.com/u/mekusigjinn)\
**Replies:** 3\
**Last updated:** [November 27, 2023, 9:08pm UTC](https://forum.elixirforum.com/t/anybody-actually-use-litestream-the-sqlite-backup-syncing-layer-with-elixir/51139 "2023-11-27T21:08:52Z")

</div>

https://github.com/akoutmos/litestream The creator is being supported by Fly.io (hired) to work full time on Litestream. I have a new project I’m ramping up and it’s going to be an e-commerce project. I’m wondering h…

---

## [Keep database state after failed test](https://forum.elixirforum.com/t/keep-database-state-after-failed-test/59867)

<div class="topic-metadata">

**Author:** [@tcoopman](https://forum.elixirforum.com/u/tcoopman)\
**Replies:** 18\
**Last updated:** [November 23, 2023, 10:29am UTC](https://forum.elixirforum.com/t/keep-database-state-after-failed-test/59867 "2023-11-23T10:29:50Z")

</div>

I’m using ecto with sqlite3. I was wondering if it’s possible to configure the ecto sandbox in such a way that the database is not cleaned up after a failed test, so that I can inspect the database.

---

## [Elixir / phoenix / sqlite / spatialite error: tracks.geom violates geometry constraint \[geom-type or srid not allowed\]](https://forum.elixirforum.com/t/elixir-phoenix-sqlite-spatialite-error-tracks-geom-violates-geometry-constraint-geom-type-or-srid-not-allowed/59077)

<div class="topic-metadata">

**Author:** [@harleyqmc](https://forum.elixirforum.com/u/harleyqmc)\
**Replies:** 2\
**Last updated:** [November 21, 2023, 7:44pm UTC](https://forum.elixirforum.com/t/elixir-phoenix-sqlite-spatialite-error-tracks-geom-violates-geometry-constraint-geom-type-or-srid-not-allowed/59077 "2023-11-21T19:44:50Z")

</div>

Hi, I’m not sure if this is the appropriate forum for my question. It’s a hybrid question involving Elixir, Phoenix, SpatiaLite, and SQLite. Perhaps someone can point me in the right direction. Firstly, here’s the erro…

---

## [How to establish Ecto Repo from Exsqlite conn in Livebook?](https://forum.elixirforum.com/t/how-to-establish-ecto-repo-from-exsqlite-conn-in-livebook/58960)

<div class="topic-metadata">

**Author:** [@jkwchui](https://forum.elixirforum.com/u/jkwchui)\
**Replies:** 2\
**Last updated:** [October 13, 2023, 8:03pm UTC](https://forum.elixirforum.com/t/how-to-establish-ecto-repo-from-exsqlite-conn-in-livebook/58960 "2023-10-13T20:03:31Z")

</div>

I was very impressed at how easy it is to crack open and do stuff with sqlite in Livebook v0.11; exsqlite gives a conn that everything else in Livebook is built around. There are many sqlite databases out there, and uti…

---

## [Sqlite3: Generators need plural table names (was: workaround for the testing sandbox)](https://forum.elixirforum.com/t/sqlite3-generators-need-plural-table-names-was-workaround-for-the-testing-sandbox/58915)

<div class="topic-metadata">

**Author:** [@lindem](https://forum.elixirforum.com/u/lindem)\
**Replies:** 49\
**Last updated:** [October 12, 2023, 8:00pm UTC](https://forum.elixirforum.com/t/sqlite3-generators-need-plural-table-names-was-workaround-for-the-testing-sandbox/58915 "2023-10-12T20:00:00Z")

</div>

Hey fellow alchemists, I was delighted to see that an sqlite3 adapter has indeed been developed since I tried phoenix and ecto last, so I decided to give it another try. Sadly, with a phoenix liveview application, usin…

---

## [General Strategies for Creating/Populating a SQLite Database as a static/read only asset](https://forum.elixirforum.com/t/general-strategies-for-creating-populating-a-sqlite-database-as-a-static-read-only-asset/55861)

<div class="topic-metadata">

**Author:** [@peck](https://forum.elixirforum.com/u/peck)\
**Replies:** 8\
**Last updated:** [May 15, 2023, 5:33am UTC](https://forum.elixirforum.com/t/general-strategies-for-creating-populating-a-sqlite-database-as-a-static-read-only-asset/55861 "2023-05-15T05:33:00Z")

</div>

Hi everyone, I’ve got a little hobby project (https://plaintexttides.com) that I’m working on and playing with sqlite a bit with it. I’m really only using a database to save myself some computation and API calls and sp…

---

## [Unable to read inserted(?) rows with SQLITE, ECTO](https://forum.elixirforum.com/t/unable-to-read-inserted-rows-with-sqlite-ecto/53952)

<div class="topic-metadata">

**Author:** [@ndrean](https://forum.elixirforum.com/u/ndrean)\
**Replies:** 2\
**Last updated:** [February 17, 2023, 8:35am UTC](https://forum.elixirforum.com/t/unable-to-read-inserted-rows-with-sqlite-ecto/53952 "2023-02-17T08:35:16Z")

</div>

I am using a CSV dataset in SQLite to seed. It seems that I can insert data but I can’t read it ! Something obvious must be missing but I just don’t see. The table looks like this: def create\_table(conn, table) do …

---

## [How to connect to a remote database （rqlite）？](https://forum.elixirforum.com/t/how-to-connect-to-a-remote-database-rqlite/51667)

<div class="topic-metadata">

**Author:** [@feng](https://forum.elixirforum.com/u/feng)\
**Replies:** 2\
**Last updated:** [November 9, 2022, 5:01am UTC](https://forum.elixirforum.com/t/how-to-connect-to-a-remote-database-rqlite/51667 "2022-11-09T05:01:27Z")

</div>

hello all, I use sqlite as the database. In the local database, It is all right config.exs config :store\_api, StoreApi.Repo, database: Path.expand("../store\_api\_dev.db", Path.dirname(\_\_ENV\_\_.file)), pool\_size: 5, …

---

## [Exqlite - make it work with existing Sqlite db](https://forum.elixirforum.com/t/exqlite-make-it-work-with-existing-sqlite-db/43702)

<div class="topic-metadata">

**Author:** [@quda](https://forum.elixirforum.com/u/quda)\
**Replies:** 10\
**Last updated:** [November 9, 2021, 8:35pm UTC](https://forum.elixirforum.com/t/exqlite-make-it-work-with-existing-sqlite-db/43702 "2021-11-09T20:35:10Z")

</div>

Hi, I need to do the following tasks for me project using Sqlite3 existing dbs (files): connect to each of the Sqlite db/files in the repository list all the tables in the db. select (filter) some tables of interest f…

---

## [Cannot compile exqlite on Windows](https://forum.elixirforum.com/t/cannot-compile-exqlite-on-windows/43693)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 11:24am UTC](https://forum.elixirforum.com/t/cannot-compile-exqlite-on-windows/43693 "2021-11-08T11:24:24Z")

</div>

Background I am trying to run this Elixir desktop app in my Windows VM: https://github.com/elixir-desktop/desktop-example-app I have installed Erlang OTP 24.X manually in my windows: https://erlang.org/download/otp\_wi…

---

## [Need help testing and working through an ecto3 and sqlite adapter](https://forum.elixirforum.com/t/need-help-testing-and-working-through-an-ecto3-and-sqlite-adapter/37870)

<div class="topic-metadata">

**Author:** [@warmwaffles](https://forum.elixirforum.com/u/warmwaffles)\
**Replies:** 21\
**Last updated:** [March 30, 2021, 1:05pm UTC](https://forum.elixirforum.com/t/need-help-testing-and-working-through-an-ecto3-and-sqlite-adapter/37870 "2021-03-30T13:05:26Z")

</div>

During the winter storm here in Texas, I was couped up without reliable electricity so I was bored and started working on an sqlite3 nif and ecto3 adapter. I had seen esqlite and sqlite\_ecto2 and thought I would try my …

---

## [Help with debugging sqlite's 'busy' error with Ecto3](https://forum.elixirforum.com/t/help-with-debugging-sqlites-busy-error-with-ecto3/33613)

<div class="topic-metadata">

**Author:** [@dmitriid](https://forum.elixirforum.com/u/dmitriid)\
**Replies:** 15\
**Last updated:** [March 1, 2021, 2:56pm UTC](https://forum.elixirforum.com/t/help-with-debugging-sqlites-busy-error-with-ecto3/33613 "2021-03-01T14:56:11Z")

</div>

Hi all This issue: Started work on migrating to Ecto3, ran into issues with Sqlite's \`busy\` · Issue #244 · elixir-sqlite/sqlite\_ecto2 · GitHub I’ve been trying a gung-ho approach to updating ecto\_sqlite2 to support ect…

---

## [Request for feedback: does an Elixir sqlite3 driver need a connection pool?](https://forum.elixirforum.com/t/request-for-feedback-does-an-elixir-sqlite3-driver-need-a-connection-pool/36689)

<div class="topic-metadata">

**Author:** [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Replies:** 5\
**Last updated:** [January 10, 2021, 1:06am UTC](https://forum.elixirforum.com/t/request-for-feedback-does-an-elixir-sqlite3-driver-need-a-connection-pool/36689 "2021-01-10T01:06:43Z")

</div>

Hello all, As part of my ongoing efforts to make an extremely fast sqlite3 Elixir driver (that steps on a Rust library) I am stumbling upon interesting problems regarding connections pools. Mind you, the technical probl…

---

## [Correct Ecto\_sql v3 migration lock function when using adapter for sqlite3](https://forum.elixirforum.com/t/correct-ecto-sql-v3-migration-lock-function-when-using-adapter-for-sqlite3/36169)

<div class="topic-metadata">

**Author:** [@Hannu](https://forum.elixirforum.com/u/Hannu)\
**Replies:** 0\
**Last updated:** [December 12, 2020, 4:27pm UTC](https://forum.elixirforum.com/t/correct-ecto-sql-v3-migration-lock-function-when-using-adapter-for-sqlite3/36169 "2020-12-12T16:27:05Z")

</div>

Hi, What should the lock\_for\_migrations function be for sqlite3 when writing an adapter to use with ecto\_sql? Reference issue in ecto. That’s pretty old comment and things have changed with ecto\_sql v3 since then. My…

---

## [Roadmap for upgrading or creating an Ecto adapter?](https://forum.elixirforum.com/t/roadmap-for-upgrading-or-creating-an-ecto-adapter/23562)

<div class="topic-metadata">

**Author:** [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Replies:** 2\
**Last updated:** [June 29, 2019, 9:02pm UTC](https://forum.elixirforum.com/t/roadmap-for-upgrading-or-creating-an-ecto-adapter/23562 "2019-06-29T21:02:56Z")

</div>

Hey everybody, The purpose of this thread is to answer three questions: How do we go about upgraging an Ecto 2.2.x adapter that is not on the latest 2.2.x version, to the latest 2.2.x version? How do we go about upgra…

---

## [While we are talking about databases... how can we encourage development/maintenance of other adapters?](https://forum.elixirforum.com/t/while-we-are-talking-about-databases-how-can-we-encourage-development-maintenance-of-other-adapters/15441)

<div class="topic-metadata">

**Author:** [@ConnorRigby](https://forum.elixirforum.com/u/ConnorRigby)\
**Replies:** 14\
**Last updated:** [December 7, 2018, 1:55am UTC](https://forum.elixirforum.com/t/while-we-are-talking-about-databases-how-can-we-encourage-development-maintenance-of-other-adapters/15441 "2018-12-07T01:55:04Z")

</div>

I’ve been reading through the discussion on which db system and a fork about MongoDB Now these are posts revolving around Phoenix/cloud, but Ecto has been useful to me in way more than just cloud applications. My issue …
