Add package initialization subcommand and package
All checks were successful
CI / release-test (push) Successful in 26s
All checks were successful
CI / release-test (push) Successful in 26s
This commit is contained in:
3
pkg/codegen/tpl/mount.sh
Normal file
3
pkg/codegen/tpl/mount.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo mount -t tmpfs -o size=100M tmpfs sample_data/data
|
||||
6
pkg/codegen/tpl/reset.sh
Normal file
6
pkg/codegen/tpl/reset.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rm sample_data/data/* || true
|
||||
|
||||
go run ./cmd init
|
||||
sqlite3 sample_data/data/{{ .DBFilename }} < sample_data/seed.sql
|
||||
10
pkg/codegen/tpl/schema.sql
Normal file
10
pkg/codegen/tpl/schema.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
PRAGMA foreign_keys = on;
|
||||
|
||||
-- =======
|
||||
-- DB meta
|
||||
-- =======
|
||||
|
||||
create table db_version (
|
||||
version integer not null
|
||||
) strict;
|
||||
insert into db_version values(0);
|
||||
Reference in New Issue
Block a user