feat(db): add SQLite schema, Store CRUD, ULID generation

Foundation layer: entities table with card support, entity_tags join
table, WAL mode, busy_timeout, full CRUD operations including
promote/demote lifecycle and soft/hard delete. 33 tests passing.
This commit is contained in:
2026-05-14 11:08:33 -04:00
parent d2ce5eca29
commit aed38433ae
8 changed files with 1309 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
package ulid
import (
"crypto/rand"
"sync"
"github.com/oklog/ulid/v2"
)
var (
entropy *ulid.MonotonicEntropy
entropyOnce sync.Once
)
func New() string {
entropyOnce.Do(func() {
entropy = ulid.Monotonic(rand.Reader, 0)
})
return ulid.MustNew(ulid.Now(), entropy).String()
}