carlos / contra Public

Clone
git clone https://amadan.net/carlos/contra

Plain git — no account needed to clone.

Download

Download this file

1package contra
2
3import "github.com/carlosframework/contra/internal/contra/model"
4
5// Models is every model the schema generator manages: `rastrillo migration
6// generate` reads it to work out what the database should look like, and
7// `rastrillo migration check` fails CI when it and the migrations disagree.
8//
9// The structs themselves live in internal/contra/model, so the app, the store
10// and the auth ceremony can each name a row without importing one another.
11// That package's doc comment carries the rule they are shaped by; read it
12// before adding a column here.
13//
14// This list is what the generator sees. A model that exists but is missing
15// from it has no migration and no table, and nothing will say so until a
16// query fails in production.
17var Models = []any{
18 &model.Account{},
19 &model.LoginKey{},
20 &model.Wrap{},
21 &model.Vault{},
22 &model.VaultMember{},
23 &model.Item{},
24 &model.LoginChallenge{},
25 &model.SignupSession{},
26 &model.DeviceLink{},
27}
28