mirror of
https://github.com/rmcrackan/Libation.git
synced 2025-12-23 22:17:52 -05:00
Supporting postgres simplifies deployments to environments such as kubernetes. Since sqlite doesn't work well on nfs shares it can be easier for databases to have a dedicated db set up that applications can connect to. Sqlite is easier for most deployments though, so this will default to that if the settings haven't been updated to support it. This change does the following: - Separate out SQLite from the DataLayer and adds a Postgres assembly for migrations as well - Add a configuration setting for a postgres connection string that will be used if it is there, otherwise reverts to the original sqlite string - Add a copydb command for the cli to bootstrap the postgres db - A convenience script to update migrations for both dbs at the same time
17 lines
410 B
C#
17 lines
410 B
C#
#nullable enable
|
|
using System;
|
|
using System.ComponentModel;
|
|
|
|
namespace LibationFileManager
|
|
{
|
|
public partial class Configuration
|
|
{
|
|
[Description("Connection string for Postgresql")]
|
|
public string? PostgresqlConnectionString
|
|
{
|
|
get => GetString(Environment.GetEnvironmentVariable("LIBATION_CONNECTION_STRING"));
|
|
set => SetString(value);
|
|
}
|
|
}
|
|
}
|