File tree Expand file tree Collapse file tree 18 files changed +253
-201
lines changed
setup/src/Magento/Setup/Model/Declaration/Schema
Declaration/ValidationRules Expand file tree Collapse file tree 18 files changed +253
-201
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class AutoIncrementColumnValidation implements ValidationInterface
25
25
/**
26
26
* Error message, that will be shown.
27
27
*/
28
- const ERROR_MESSAGE = 'Auto Increment column do not have index. Column - "%s" ' ;
28
+ const ERROR_MESSAGE = 'Auto Increment column do not have index. Column - "%s", table - "%s" ' ;
29
29
30
30
/**
31
31
* @inheritdoc
@@ -54,7 +54,7 @@ public function validate(Schema $schema)
54
54
55
55
$ errors [] = [
56
56
'column ' => $ column ->getName (),
57
- 'message ' => sprintf (self ::ERROR_MESSAGE , $ column ->getName ())
57
+ 'message ' => sprintf (self ::ERROR_MESSAGE , $ column ->getName (), $ table -> getName () )
58
58
];
59
59
}
60
60
}
Original file line number Diff line number Diff line change 34
34
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/constraints/primary.xsd" />
35
35
<!-- Indexes-->
36
36
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/index.xsd" />
37
+ <xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/types/column.xsd" />
37
38
38
39
<xs : element name =" schema" >
39
40
<xs : complexType >
50
51
</xs : documentation >
51
52
</xs : annotation >
52
53
<xs : choice minOccurs =" 0" maxOccurs =" unbounded" >
53
- <xs : element name =" column" />
54
+ <xs : element name =" column" type = " abstractColumnType " />
54
55
<xs : element name =" constraint" />
55
56
<xs : element name =" index" type =" index" />
56
57
</xs : choice >
Original file line number Diff line number Diff line change 9
9
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/types/column.xsd" />
10
10
11
11
<xs : complexType name =" blob" >
12
- <xs : annotation >
13
- <xs : documentation >
14
- Can be used as binary source
15
- </xs : documentation >
16
- </xs : annotation >
12
+ <xs : complexContent >
13
+ <xs : extension base =" abstractColumnType" >
14
+ <xs : annotation >
15
+ <xs : documentation >
16
+ Can be used as binary source
17
+ </xs : documentation >
18
+ </xs : annotation >
17
19
18
- <xs : attributeGroup ref =" baseColumn" />
19
- <xs : attribute name =" nullable" type =" xs:boolean" />
20
+ <xs : attribute name =" nullable" type =" xs:boolean" />
21
+ </xs : extension >
22
+ </xs : complexContent >
20
23
</xs : complexType >
21
24
</xs : schema >
Original file line number Diff line number Diff line change 9
9
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/types/column.xsd" />
10
10
11
11
<xs : complexType name =" longblob" >
12
- <xs : annotation >
13
- <xs : documentation >
14
- Can be used as binary source. Different types can be used depends on data size
15
- you want to persist
16
- </xs : documentation >
17
- </xs : annotation >
12
+ <xs : complexContent >
13
+ <xs : extension base =" abstractColumnType" >
14
+ <xs : annotation >
15
+ <xs : documentation >
16
+ Can be used as binary source. Different types can be used depends on data size
17
+ you want to persist
18
+ </xs : documentation >
19
+ </xs : annotation >
18
20
19
- <xs : attributeGroup ref =" baseColumn" />
20
- <xs : attribute name =" nullable" type =" xs:boolean" />
21
+ <xs : attribute name =" nullable" type =" xs:boolean" />
22
+ </xs : extension >
23
+ </xs : complexContent >
21
24
</xs : complexType >
22
25
</xs : schema >
Original file line number Diff line number Diff line change 9
9
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/types/column.xsd" />
10
10
11
11
<xs : complexType name =" mediumblob" >
12
- <xs : annotation >
13
- <xs : documentation >
14
- Can be used as binary source
15
- </xs : documentation >
16
- </xs : annotation >
12
+ <xs : complexContent >
13
+ <xs : extension base =" abstractColumnType" >
14
+ <xs : annotation >
15
+ <xs : documentation >
16
+ Can be used as binary source
17
+ </xs : documentation >
18
+ </xs : annotation >
17
19
18
- <xs : attributeGroup ref =" baseColumn" />
19
- <xs : attribute name =" nullable" type =" xs:boolean" />
20
+ <xs : attribute name =" nullable" type =" xs:boolean" />
21
+ </xs : extension >
22
+ </xs : complexContent >
20
23
</xs : complexType >
21
24
</xs : schema >
Original file line number Diff line number Diff line change 9
9
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/types/column.xsd" />
10
10
11
11
<xs : complexType name =" varbinary" >
12
- <xs : annotation >
13
- <xs : documentation >
14
- Can be used as binary source
15
- </xs : documentation >
16
- </xs : annotation >
12
+ <xs : complexContent >
13
+ <xs : extension base =" abstractColumnType" >
14
+ <xs : annotation >
15
+ <xs : documentation >
16
+ Can be used as binary source
17
+ </xs : documentation >
18
+ </xs : annotation >
17
19
18
- <xs : attributeGroup ref =" baseColumn" />
19
- <xs : attribute name =" length" >
20
- <xs : simpleType >
21
- <xs : restriction base =" xs:integer" >
22
- <xs : maxInclusive value =" 255" />
23
- </xs : restriction >
24
- </xs : simpleType >
25
- </xs : attribute >
26
- <xs : attribute name =" default" type =" xs:string" />
27
- <xs : attribute name =" nullable" type =" xs:boolean" />
20
+ <xs : attribute name =" length" >
21
+ <xs : simpleType >
22
+ <xs : restriction base =" xs:integer" >
23
+ <xs : maxInclusive value =" 255" />
24
+ </xs : restriction >
25
+ </xs : simpleType >
26
+ </xs : attribute >
27
+ <xs : attribute name =" default" type =" xs:string" />
28
+ <xs : attribute name =" nullable" type =" xs:boolean" />
29
+ </xs : extension >
30
+ </xs : complexContent >
28
31
</xs : complexType >
29
32
</xs : schema >
Original file line number Diff line number Diff line change 9
9
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/types/column.xsd" />
10
10
11
11
<xs : complexType name =" boolean" >
12
- <xs : attributeGroup ref =" baseColumn" />
13
- <xs : attribute name =" default" type =" xs:boolean" />
14
- <xs : attribute name =" nullable" type =" xs:boolean" />
12
+ <xs : complexContent >
13
+ <xs : extension base =" abstractColumnType" >
14
+ <xs : attribute name =" default" type =" xs:boolean" />
15
+ <xs : attribute name =" nullable" type =" xs:boolean" />
16
+ </xs : extension >
17
+ </xs : complexContent >
15
18
</xs : complexType >
16
19
</xs : schema >
Original file line number Diff line number Diff line change 7
7
-->
8
8
<xs : schema xmlns : xs =" http://www.w3.org/2001/XMLSchema" elementFormDefault =" qualified" >
9
9
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/operations.xsd" />
10
-
11
10
<xs : attributeGroup name =" baseColumn" >
12
11
<xs : attributeGroup ref =" basicOperations" />
13
12
<xs : attribute name =" name" type =" nameType" use =" required" />
20
19
</xs : annotation >
21
20
</xs : attribute >
22
21
</xs : attributeGroup >
22
+
23
+ <xs : complexType name =" abstractColumnType" >
24
+ <xs : complexContent >
25
+ <xs : extension base =" xs:anyType" >
26
+ <xs : attributeGroup ref =" baseColumn" />
27
+ </xs : extension >
28
+ </xs : complexContent >
29
+ </xs : complexType >
23
30
</xs : schema >
Original file line number Diff line number Diff line change 9
9
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/types/column.xsd" />
10
10
11
11
<xs : complexType name =" date" >
12
- <xs : annotation >
13
- <xs : documentation >
14
- This format is used to save date (year, month, day).
15
- Probably your SQL engine will save date in this format: 'YYYY-MM-DD'
16
- Dates in invalid format will be converted to '0000-00-00' string
17
- </xs : documentation >
18
- </xs : annotation >
12
+ <xs : complexContent >
13
+ <xs : extension base =" abstractColumnType" >
14
+ <xs : annotation >
15
+ <xs : documentation >
16
+ This format is used to save date (year, month, day).
17
+ Probably your SQL engine will save date in this format: 'YYYY-MM-DD'
18
+ Dates in invalid format will be converted to '0000-00-00' string
19
+ </xs : documentation >
20
+ </xs : annotation >
19
21
20
- <xs : attribute name =" nullable" type =" xs:boolean" />
21
- <xs : attributeGroup ref =" baseColumn" />
22
+ <xs : attribute name =" nullable" type =" xs:boolean" />
23
+ </xs : extension >
24
+ </xs : complexContent >
22
25
</xs : complexType >
23
26
</xs : schema >
Original file line number Diff line number Diff line change 10
10
<xs : include schemaLocation =" urn:magento:setup:Model/Declaration/Schema/etc/types/datetime/default.xsd" />
11
11
12
12
<xs : complexType name =" datetime" >
13
- <xs : annotation >
14
- <xs : documentation >
15
- This format is used to save date (year, month, day).
16
- Probably your SQL engine will save date in this format: 'YYYY-MM-DD HH:MM::SS'
17
- Date time in invalid format will be converted to '0000-00-00 00:00:00' string
18
- Supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'
19
- DateTime format save date and time in your local time zone
20
- </xs : documentation >
21
- </xs : annotation >
13
+ <xs : complexContent >
14
+ <xs : extension base =" abstractColumnType" >
15
+ <xs : annotation >
16
+ <xs : documentation >
17
+ This format is used to save date (year, month, day).
18
+ Probably your SQL engine will save date in this format: 'YYYY-MM-DD HH:MM::SS'
19
+ Date time in invalid format will be converted to '0000-00-00 00:00:00' string
20
+ Supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'
21
+ DateTime format save date and time in your local time zone
22
+ </xs : documentation >
23
+ </xs : annotation >
22
24
23
- <xs : attributeGroup ref =" baseColumn" />
24
- <xs : attributeGroup ref =" default" />
25
+ <xs : attributeGroup ref =" default" />
26
+ </xs : extension >
27
+ </xs : complexContent >
25
28
</xs : complexType >
26
29
</xs : schema >
You can’t perform that action at this time.
0 commit comments