Skip to content

Commit

Permalink
fix posgres table name
Browse files Browse the repository at this point in the history
  • Loading branch information
nhathoang989 committed Oct 12, 2023
1 parent 5eb58ab commit 4cd83ab
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"isCache": true,
"connectionString": "Data Source=MixContent\\mix-cms.db",
"connectionString": "Data Source=mixcontent\\mix-cms.sqlite",
"databaseProvider": "SQLITE",
"cacheMode": "JSON",
"cacheFolder": "MixContent/cache"
Expand Down
4 changes: 2 additions & 2 deletions src/platform/mix.database/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
### Update DatabaseService -> GetConnectionstring
### Update DatabaseService.DatabaseProvider
# Sample Connection String:
- Sqlite: "Data Source=MixContent\\mix-cms.db"
- Sqlite: "Data Source=MixContent\\mix-cms.sqlite"
```
DatabaseProvider = MixDatabaseProvider.SQLITE;
return "Data Source=MixContent\\mix-cms.db";
return "Data Source=MixContent\\mix-cms.sqlite";
```

- Postgres: "Host=localhost;Database=mixcore_structure;Username=postgres;Password=myPassword"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public MixRepoDbRepository(ICache cache, MixDatabaseProvider databaseProvider, s
#region Methods
public void InitTableName(string tableName)
{
_tableName = tableName.ToLower();
_tableName = tableName;
InitializeRepoDb();
CreateConnection();
}
Expand Down
2 changes: 1 addition & 1 deletion src/platform/mix.repodb/Services/MixDbService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ private async Task<bool> BackupToLocal(MixDatabaseViewModel database, Cancellati

private void InitBackupRepository(string databaseName)
{
string cnn = $"Data Source=MixContent/Backup/backup_{databaseName}.db";
string cnn = $"Data Source=MixContent/Backup/backup_{databaseName}.sqlite";
using var ctx = new BackupDbContext(cnn);
ctx.Database.EnsureCreated();
ctx.Dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public abstract class SharedDatabaseFixture<TDbContext>
private static bool _databaseInitialized;
protected static ConstructorInfo ctor;
public TDbContext Context { get; set; }
public string ConnectionString = "Data Source=MixContent\\mix-test.db";
public string ConnectionString = "Data Source=mixcontent\\mix-test.sqlite";
public MixDatabaseProvider DbProvider = MixDatabaseProvider.SQLITE;

public SharedDatabaseFixture()
Expand Down

0 comments on commit 4cd83ab

Please sign in to comment.