synced with master
This commit is contained in:
@@ -190,7 +190,7 @@ func (f SchemaField) Validate() error {
|
||||
|
||||
excludeNames := BaseModelFieldNames()
|
||||
// exclude special filter literals
|
||||
excludeNames = append(excludeNames, "null", "true", "false")
|
||||
excludeNames = append(excludeNames, "null", "true", "false", "_rowid_")
|
||||
// exclude system literals
|
||||
excludeNames = append(excludeNames, SystemFieldNames()...)
|
||||
|
||||
|
||||
@@ -313,6 +313,15 @@ func TestSchemaFieldValidate(t *testing.T) {
|
||||
},
|
||||
[]string{"name"},
|
||||
},
|
||||
{
|
||||
"reserved name (_rowid_)",
|
||||
schema.SchemaField{
|
||||
Type: schema.FieldTypeText,
|
||||
Id: "1234567890",
|
||||
Name: "_rowid_",
|
||||
},
|
||||
[]string{"name"},
|
||||
},
|
||||
{
|
||||
"reserved name (id)",
|
||||
schema.SchemaField{
|
||||
|
||||
Reference in New Issue
Block a user