Added a database
This commit is contained in:
parent
ebaec3d296
commit
8136655336
35 changed files with 925 additions and 134 deletions
|
|
@ -13,15 +13,15 @@ CREATE TABLE sites (
|
|||
|
||||
FOREIGN KEY (owner_id) REFERENCES users (id) ON DELETE CASCADE
|
||||
);
|
||||
CREATE INDEX idx_site_owner ON site (owner_id);
|
||||
CREATE INDEX idx_site_owner ON sites (owner_id);
|
||||
|
||||
CREATE TABLE publish_targets (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
site_id INTEGER NOT NULL,
|
||||
publish_target_type INTEGER NOT NULL,
|
||||
base_url TEXT NOT NULL,
|
||||
target_site_id TEXT NOT NULL,
|
||||
target_publish_key TEXT NOT NULL
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
site_id INTEGER NOT NULL,
|
||||
target_type INTEGER NOT NULL,
|
||||
base_url TEXT NOT NULL,
|
||||
target_ref TEXT NOT NULL,
|
||||
target_key TEXT NOT NULL
|
||||
);
|
||||
CREATE INDEX idx_publish_targets_site ON publish_targets (site_id);
|
||||
|
||||
|
|
|
|||
6
sql/schema/fs.go
Normal file
6
sql/schema/fs.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package schema
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed *.sql
|
||||
var FS embed.FS
|
||||
Loading…
Add table
Add a link
Reference in a new issue