1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

orm: improve the README and the tests. Add an error message for foreign key tags (#15670)

This commit is contained in:
Hitalo Souza
2022-09-06 07:12:37 -03:00
committed by GitHub
parent e3d3863fbe
commit 95a328be98
4 changed files with 41 additions and 25 deletions

View File

@ -383,7 +383,6 @@ pub fn orm_table_gen(table string, q string, defaults bool, def_unique_len int,
mut is_unique := false
mut is_skip := false
mut unique_len := 0
// mut fkey := ''
mut field_name := sql_field_name(field)
mut ctyp := sql_from_v(sql_field_type(field)) or {
field_name = '${field_name}_id'
@ -427,14 +426,6 @@ pub fn orm_table_gen(table string, q string, defaults bool, def_unique_len int,
default_val = attr.arg
}
}
/*'fkey' {
if attr.arg != '' {
if attr.kind == .string {
fkey = attr.arg
continue
}
}
}*/
else {}
}
}