package base import ( "testing" "git.fsdpf.net/go/db/schema" "git.fsdpf.net/go/req" "git.fsdpf.net/go/req/resx" _ "git.fsdpf.net/go/db/schema/dialect/mysql" _ "git.fsdpf.net/go/db/schema/dialect/sqlite3" ) func TestResFieldToBlueprint(t *testing.T) { t.Run("id", func(t *testing.T) { table := schema.NewBlueprint("users") id := resx.NewResField("id", "User", resx.FieldWithUuid("00000000-0000-0000-0000-000000000000"), resx.FieldWithName("ID"), resx.FieldWithLength("20"), resx.FieldWithDefault("sql:AUTO_INCREMENT"), resx.FieldWithDataType(req.ResInteger)) id.ToBlueprint(table) }) }