BeaconCMS / BeaconCMS/beacon

Support SQLite3 Repos

Open
#615 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
1.3k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

Selecting sqlite3 as database adaptor fails during migration. The first error in lib/beacon/migrations/v001.ex is at line 89, due to the exsqlite3 library's lack of support for alter table - in turn probably related to sqlite3 DDL quirks, but probably not necessary to use 'alter table' for the very first migration anyway.

More concerning are the unsupported constraint checks, which may or may not be supported by sqlite3.

**Describe the solution you'd like**

It would be nice if sqlite3 was supported without any ceremony since it is a solid few-moving-parts database solution for a dynamic website.

**Additional context**

To get sqlite3 support working in my project, I copied the v001 and v002 migration steps into my own migration, moved the alter table add statements into the create table blocks immediately above them, commented out two sets of erroring constraints. As a proof of concept that sqlite3 support could be made to work by refactoring the SQL and perhaps moving constraints into ecto, this seems reasonably compelling.

Contributor guide

Open the contributing guide

Research direction

Start with lib/beacon/migrations/v001.ex at line 89, then compare the v001 and v002 migration steps described in the issue. Review the alter table statements and the failing constraint checks under exsqlite3. Done means SQLite3 repositories can complete these migrations without the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir, sqlite
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.