mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: update attributes to use new syntax
This commit is contained in:
parent
dd81cb98c6
commit
757929392e
739 changed files with 2982 additions and 2982 deletions
|
@ -35,30 +35,30 @@ const (
|
|||
pg_db = os.getenv_opt('PGDATABASE') or { 'test' }
|
||||
)
|
||||
|
||||
[table: 'modules']
|
||||
@[table: 'modules']
|
||||
struct Module {
|
||||
id int [primary; sql: serial]
|
||||
id int @[primary; sql: serial]
|
||||
name string
|
||||
nr_downloads int [sql: u64]
|
||||
nr_downloads int @[sql: u64]
|
||||
creator User
|
||||
}
|
||||
|
||||
struct User {
|
||||
id int [primary; sql: serial]
|
||||
age u32 [unique: 'user']
|
||||
name string [sql: 'username'; sql_type: 'VARCHAR(200)'; unique]
|
||||
is_customer bool [sql: 'abc'; unique: 'user']
|
||||
skipped_string string [skip]
|
||||
id int @[primary; sql: serial]
|
||||
age u32 @[unique: 'user']
|
||||
name string @[sql: 'username'; sql_type: 'VARCHAR(200)'; unique]
|
||||
is_customer bool @[sql: 'abc'; unique: 'user']
|
||||
skipped_string string @[skip]
|
||||
}
|
||||
|
||||
struct Parent {
|
||||
id int [primary; sql: serial]
|
||||
id int @[primary; sql: serial]
|
||||
name string
|
||||
children []Child [fkey: 'parent_id']
|
||||
children []Child @[fkey: 'parent_id']
|
||||
}
|
||||
|
||||
struct Child {
|
||||
id int [primary; sql: serial]
|
||||
id int @[primary; sql: serial]
|
||||
parent_id int
|
||||
name string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue