2
0

Use a local SQLite3 backend instead of PostgreSQL Docker container.

* The provided SQLite3 database contains the required schemas, but no data and can be reset to if required.
* Remove all references to PostgreSQL in documentation and configuration.
* Replace native sqlite3 command with a console app to remove dependency on SQLite3 installation.
This commit is contained in:
2025-11-03 15:09:09 +01:00
parent b61e6a6cc7
commit f1c0021ad3
14 changed files with 124 additions and 139 deletions

24
show-posts/Post.cs Normal file
View File

@@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("posts")]
public class Post
{
[Key]
[Column("id")]
public int Id { get; set; }
[Column("user_id")]
public int UserId { get; set; }
[Column("title")]
[Required]
public string Title { get; set; } = string.Empty;
[Column("body")]
[Required]
public string Body { get; set; } = string.Empty;
[Column("updated_at")]
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.Parse("1970-01-01T00:00:00Z"); // TODO: Remove the default value in Phase 3.
}