|
27 | 27 | */ |
28 | 28 | interface AdapterInterface |
29 | 29 | { |
30 | | - public const PHINX_TYPE_STRING = TableSchemaInterface::TYPE_STRING; |
31 | | - public const PHINX_TYPE_CHAR = TableSchemaInterface::TYPE_CHAR; |
32 | | - public const PHINX_TYPE_TEXT = TableSchemaInterface::TYPE_TEXT; |
33 | | - public const PHINX_TYPE_INTEGER = TableSchemaInterface::TYPE_INTEGER; |
34 | | - public const PHINX_TYPE_TINY_INTEGER = TableSchemaInterface::TYPE_TINYINTEGER; |
35 | | - public const PHINX_TYPE_SMALL_INTEGER = TableSchemaInterface::TYPE_SMALLINTEGER; |
36 | | - public const PHINX_TYPE_BIG_INTEGER = TableSchemaInterface::TYPE_BIGINTEGER; |
37 | | - public const PHINX_TYPE_FLOAT = TableSchemaInterface::TYPE_FLOAT; |
38 | | - public const PHINX_TYPE_DECIMAL = TableSchemaInterface::TYPE_DECIMAL; |
39 | | - public const PHINX_TYPE_DATETIME = TableSchemaInterface::TYPE_DATETIME; |
40 | | - public const PHINX_TYPE_TIMESTAMP = TableSchemaInterface::TYPE_TIMESTAMP; |
41 | | - public const PHINX_TYPE_TIME = TableSchemaInterface::TYPE_TIME; |
42 | | - public const PHINX_TYPE_DATE = TableSchemaInterface::TYPE_DATE; |
43 | | - public const PHINX_TYPE_BINARY = TableSchemaInterface::TYPE_BINARY; |
44 | | - public const PHINX_TYPE_BINARYUUID = TableSchemaInterface::TYPE_BINARY_UUID; |
45 | | - public const PHINX_TYPE_BOOLEAN = TableSchemaInterface::TYPE_BOOLEAN; |
46 | | - public const PHINX_TYPE_JSON = TableSchemaInterface::TYPE_JSON; |
| 30 | + public const TYPE_STRING = TableSchemaInterface::TYPE_STRING; |
| 31 | + public const TYPE_CHAR = TableSchemaInterface::TYPE_CHAR; |
| 32 | + public const TYPE_TEXT = TableSchemaInterface::TYPE_TEXT; |
| 33 | + public const TYPE_INTEGER = TableSchemaInterface::TYPE_INTEGER; |
| 34 | + public const TYPE_TINYINTEGER = TableSchemaInterface::TYPE_TINYINTEGER; |
| 35 | + public const TYPE_SMALLINTEGER = TableSchemaInterface::TYPE_SMALLINTEGER; |
| 36 | + public const TYPE_BIGINTEGER = TableSchemaInterface::TYPE_BIGINTEGER; |
| 37 | + public const TYPE_FLOAT = TableSchemaInterface::TYPE_FLOAT; |
| 38 | + public const TYPE_DECIMAL = TableSchemaInterface::TYPE_DECIMAL; |
| 39 | + public const TYPE_DATETIME = TableSchemaInterface::TYPE_DATETIME; |
| 40 | + public const TYPE_TIMESTAMP = TableSchemaInterface::TYPE_TIMESTAMP; |
| 41 | + public const TYPE_TIME = TableSchemaInterface::TYPE_TIME; |
| 42 | + public const TYPE_DATE = TableSchemaInterface::TYPE_DATE; |
| 43 | + public const TYPE_BINARY = TableSchemaInterface::TYPE_BINARY; |
| 44 | + public const TYPE_BINARY_UUID = TableSchemaInterface::TYPE_BINARY_UUID; |
| 45 | + public const TYPE_BOOLEAN = TableSchemaInterface::TYPE_BOOLEAN; |
| 46 | + public const TYPE_JSON = TableSchemaInterface::TYPE_JSON; |
| 47 | + public const TYPE_UUID = TableSchemaInterface::TYPE_UUID; |
| 48 | + public const TYPE_NATIVE_UUID = TableSchemaInterface::TYPE_NATIVE_UUID; |
| 49 | + |
| 50 | + // Geospatial database types |
| 51 | + public const TYPE_GEOMETRY = TableSchemaInterface::TYPE_GEOMETRY; |
| 52 | + public const TYPE_POINT = TableSchemaInterface::TYPE_POINT; |
| 53 | + public const TYPE_LINESTRING = TableSchemaInterface::TYPE_LINESTRING; |
| 54 | + public const TYPE_POLYGON = TableSchemaInterface::TYPE_POLYGON; |
| 55 | + |
| 56 | + public const TYPES_GEOSPATIAL = [ |
| 57 | + self::TYPE_GEOMETRY, |
| 58 | + self::TYPE_POINT, |
| 59 | + self::TYPE_LINESTRING, |
| 60 | + self::TYPE_POLYGON, |
| 61 | + ]; |
| 62 | + |
| 63 | + // only for mysql so far |
| 64 | + public const TYPE_YEAR = TableSchemaInterface::TYPE_YEAR; |
| 65 | + |
| 66 | + // only for postgresql so far |
| 67 | + public const TYPE_CIDR = TableSchemaInterface::TYPE_CIDR; |
| 68 | + public const TYPE_INET = TableSchemaInterface::TYPE_INET; |
| 69 | + public const TYPE_MACADDR = TableSchemaInterface::TYPE_MACADDR; |
| 70 | + public const TYPE_INTERVAL = TableSchemaInterface::TYPE_INTERVAL; |
| 71 | + |
| 72 | + /** |
| 73 | + * @deprecated 5.0.0 Use TYPE_STRING instead. |
| 74 | + */ |
| 75 | + public const PHINX_TYPE_STRING = self::TYPE_STRING; |
| 76 | + /** |
| 77 | + * @deprecated 5.0.0 Use TYPE_CHAR instead. |
| 78 | + */ |
| 79 | + public const PHINX_TYPE_CHAR = self::TYPE_CHAR; |
| 80 | + /** |
| 81 | + * @deprecated 5.0.0 Use TYPE_TEXT instead. |
| 82 | + */ |
| 83 | + public const PHINX_TYPE_TEXT = self::TYPE_TEXT; |
| 84 | + /** |
| 85 | + * @deprecated 5.0.0 Use TYPE_INTEGER instead. |
| 86 | + */ |
| 87 | + public const PHINX_TYPE_INTEGER = self::TYPE_INTEGER; |
| 88 | + /** |
| 89 | + * @deprecated 5.0.0 Use TYPE_TINYINTEGER instead. |
| 90 | + */ |
| 91 | + public const PHINX_TYPE_TINY_INTEGER = self::TYPE_TINYINTEGER; |
| 92 | + /** |
| 93 | + * @deprecated 5.0.0 Use TYPE_SMALLINTEGER instead. |
| 94 | + */ |
| 95 | + public const PHINX_TYPE_SMALL_INTEGER = self::TYPE_SMALLINTEGER; |
| 96 | + /** |
| 97 | + * @deprecated 5.0.0 Use TYPE_BIGINTEGER instead. |
| 98 | + */ |
| 99 | + public const PHINX_TYPE_BIG_INTEGER = self::TYPE_BIGINTEGER; |
| 100 | + /** |
| 101 | + * @deprecated 5.0.0 Use TYPE_FLOAT instead. |
| 102 | + */ |
| 103 | + public const PHINX_TYPE_FLOAT = self::TYPE_FLOAT; |
| 104 | + /** |
| 105 | + * @deprecated 5.0.0 Use TYPE_DECIMAL instead. |
| 106 | + */ |
| 107 | + public const PHINX_TYPE_DECIMAL = self::TYPE_DECIMAL; |
| 108 | + /** |
| 109 | + * @deprecated 5.0.0 Use TYPE_DATETIME instead. |
| 110 | + */ |
| 111 | + public const PHINX_TYPE_DATETIME = self::TYPE_DATETIME; |
| 112 | + /** |
| 113 | + * @deprecated 5.0.0 Use TYPE_TIMESTAMP instead. |
| 114 | + */ |
| 115 | + public const PHINX_TYPE_TIMESTAMP = self::TYPE_TIMESTAMP; |
| 116 | + /** |
| 117 | + * @deprecated 5.0.0 Use TYPE_TIME instead. |
| 118 | + */ |
| 119 | + public const PHINX_TYPE_TIME = self::TYPE_TIME; |
| 120 | + /** |
| 121 | + * @deprecated 5.0.0 Use TYPE_DATE instead. |
| 122 | + */ |
| 123 | + public const PHINX_TYPE_DATE = self::TYPE_DATE; |
| 124 | + /** |
| 125 | + * @deprecated 5.0.0 Use TYPE_BINARY instead. |
| 126 | + */ |
| 127 | + public const PHINX_TYPE_BINARY = self::TYPE_BINARY; |
| 128 | + /** |
| 129 | + * @deprecated 5.0.0 Use TYPE_BINARY_UUID instead. |
| 130 | + */ |
| 131 | + public const PHINX_TYPE_BINARYUUID = self::TYPE_BINARY_UUID; |
| 132 | + /** |
| 133 | + * @deprecated 5.0.0 Use TYPE_BOOLEAN instead. |
| 134 | + */ |
| 135 | + public const PHINX_TYPE_BOOLEAN = self::TYPE_BOOLEAN; |
| 136 | + /** |
| 137 | + * @deprecated 5.0.0 Use TYPE_JSON instead. |
| 138 | + */ |
| 139 | + public const PHINX_TYPE_JSON = self::TYPE_JSON; |
47 | 140 | /** |
48 | 141 | * @deprecated 5.0.0 Use TableSchemaInterface::TYPE_JSON instead. |
49 | 142 | */ |
50 | 143 | public const PHINX_TYPE_JSONB = 'jsonb'; |
51 | | - public const PHINX_TYPE_UUID = TableSchemaInterface::TYPE_UUID; |
52 | | - public const PHINX_TYPE_NATIVEUUID = TableSchemaInterface::TYPE_NATIVE_UUID; |
| 144 | + /** |
| 145 | + * @deprecated 5.0.0 Use TYPE_UUID instead. |
| 146 | + */ |
| 147 | + public const PHINX_TYPE_UUID = self::TYPE_UUID; |
| 148 | + /** |
| 149 | + * @deprecated 5.0.0 Use TYPE_NATIVE_UUID instead. |
| 150 | + */ |
| 151 | + public const PHINX_TYPE_NATIVEUUID = self::TYPE_NATIVE_UUID; |
53 | 152 |
|
54 | | - // Geospatial database types |
55 | | - public const PHINX_TYPE_GEOMETRY = TableSchemaInterface::TYPE_GEOMETRY; |
56 | | - public const PHINX_TYPE_POINT = TableSchemaInterface::TYPE_POINT; |
57 | | - public const PHINX_TYPE_LINESTRING = TableSchemaInterface::TYPE_LINESTRING; |
58 | | - public const PHINX_TYPE_POLYGON = TableSchemaInterface::TYPE_POLYGON; |
| 153 | + /** |
| 154 | + * @deprecated 5.0.0 Use TYPE_GEOMETRY instead. |
| 155 | + */ |
| 156 | + public const PHINX_TYPE_GEOMETRY = self::TYPE_GEOMETRY; |
| 157 | + /** |
| 158 | + * @deprecated 5.0.0 Use TYPE_POINT instead. |
| 159 | + */ |
| 160 | + public const PHINX_TYPE_POINT = self::TYPE_POINT; |
| 161 | + /** |
| 162 | + * @deprecated 5.0.0 Use TYPE_LINESTRING instead. |
| 163 | + */ |
| 164 | + public const PHINX_TYPE_LINESTRING = self::TYPE_LINESTRING; |
| 165 | + /** |
| 166 | + * @deprecated 5.0.0 Use TYPE_POLYGON instead. |
| 167 | + */ |
| 168 | + public const PHINX_TYPE_POLYGON = self::TYPE_POLYGON; |
59 | 169 |
|
| 170 | + /** |
| 171 | + * @deprecated 5.0.0 Use TYPES_GEOSPATIAL instead. |
| 172 | + */ |
60 | 173 | public const PHINX_TYPES_GEOSPATIAL = [ |
61 | | - self::PHINX_TYPE_GEOMETRY, |
62 | | - self::PHINX_TYPE_POINT, |
63 | | - self::PHINX_TYPE_LINESTRING, |
64 | | - self::PHINX_TYPE_POLYGON, |
| 174 | + self::TYPE_GEOMETRY, |
| 175 | + self::TYPE_POINT, |
| 176 | + self::TYPE_LINESTRING, |
| 177 | + self::TYPE_POLYGON, |
65 | 178 | ]; |
66 | 179 |
|
67 | | - // only for mysql so far |
68 | | - public const PHINX_TYPE_YEAR = TableSchemaInterface::TYPE_YEAR; |
| 180 | + /** |
| 181 | + * @deprecated 5.0.0 Use TYPE_YEAR instead. |
| 182 | + */ |
| 183 | + public const PHINX_TYPE_YEAR = self::TYPE_YEAR; |
69 | 184 |
|
70 | | - // only for postgresql so far |
71 | | - public const PHINX_TYPE_CIDR = TableSchemaInterface::TYPE_CIDR; |
72 | | - public const PHINX_TYPE_INET = TableSchemaInterface::TYPE_INET; |
73 | | - public const PHINX_TYPE_MACADDR = TableSchemaInterface::TYPE_MACADDR; |
74 | | - public const PHINX_TYPE_INTERVAL = TableSchemaInterface::TYPE_INTERVAL; |
| 185 | + /** |
| 186 | + * @deprecated 5.0.0 Use TYPE_CIDR instead. |
| 187 | + */ |
| 188 | + public const PHINX_TYPE_CIDR = self::TYPE_CIDR; |
| 189 | + /** |
| 190 | + * @deprecated 5.0.0 Use TYPE_INET instead. |
| 191 | + */ |
| 192 | + public const PHINX_TYPE_INET = self::TYPE_INET; |
| 193 | + /** |
| 194 | + * @deprecated 5.0.0 Use TYPE_MACADDR instead. |
| 195 | + */ |
| 196 | + public const PHINX_TYPE_MACADDR = self::TYPE_MACADDR; |
| 197 | + /** |
| 198 | + * @deprecated 5.0.0 Use TYPE_INTERVAL instead. |
| 199 | + */ |
| 200 | + public const PHINX_TYPE_INTERVAL = self::TYPE_INTERVAL; |
75 | 201 |
|
76 | 202 | /** |
77 | 203 | * Get all migrated version numbers. |
|
0 commit comments