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

orm: add unique fields & add drop table stmt (#9684)

This commit is contained in:
Louis Schmieder
2021-04-11 23:57:25 +02:00
committed by GitHub
parent b0b3c51658
commit 67d8639917
6 changed files with 101 additions and 7 deletions

View File

@@ -4,7 +4,9 @@
### Fields
- `[primary]` set the field as the primary key
- `[primary]` sets the field as the primary key
- `[unique]` sets the field as unique
- `[unique: 'foo']` adds the field to a unique group
- `[nonull]` field will be `NOT NULL` in table creation
- `[skip]` field will be skipped
- `[sql: type]` sets the type which is used in sql (special type `serial`)
@@ -26,6 +28,14 @@ sql db {
}
```
### Drop
```v ignore
sql db {
drop table Foo
}
```
### Insert
```v ignore