orm
orm copied to clipboard
Add missing migration methods from Laravel
Describe the feature as you'd like to see it Missing table methods from Laravel docs:
- [ ]
datetimeTz - [x] ❕
foreignId- #752 - [x] ❕
foreignIdFor- #752 - [x] ❕
foreignUuid- #752 - [ ]
geometryCollection - [x] ❕
id- #752 - [ ]
ipAddress - [ ]
lineString - [x]
macAddress - [ ]
mediumIncrements - [ ]
mediumText - [ ]
morphs - [ ]
multiLineString - [ ]
multiPoint - [ ]
multiPolygon - [ ]
nullableMorphs - [ ]
nullableTimestamps - [ ]
nullableUuidMorphs - [ ]
polygon - [ ]
rememberToken - [ ] ❕
set - [ ]
smallIncrements - [ ]
softDeletesTz - [ ]
timeTz - [ ]
timestampTz - [ ]
timestampsTz - [ ] ❕
tinyText#771 - [x] ❕
unsignedBigInteger- #752 - [ ] ❕
unsignedDecimal#771 - [ ]
unsignedMediumInteger - [ ]
unsignedSmallInteger - [ ]
unsignedTinyInteger - [ ]
uuidMorphs - [ ] ❕
year
I've added a ❕indicating the ones more important
What do we currently have to do now? Just add these methods
- [ ] Is this a breaking change?
Are you able to open a PR and add these?
It would actually be pretty straight forward:
- add the method to the blueprint class
- add the column map to each Platform class (sqlite, mysql, Postgres and mssql)
- Write tests in each other test_{database}_schema_builder.py files
Yes, I can look at them
Thanks
@maicol07 macAddress already exists here's the code in orm
def macaddr(self, column, length=255, nullable=False):
"""Sets a column to be the macaddr representation for the table.
Arguments:
column {string} -- The column name.
Keyword Arguments:
nullable {bool} -- Whether the column is nullable. (default: {False})
Returns:
self
"""
self._last_column = self.table.add_column(
column, "macaddr", length=255, nullable=nullable
)
return self
@maicol07
macAddressalready exists here's the code inormdef macaddr(self, column, length=255, nullable=False): """Sets a column to be the macaddr representation for the table. Arguments: column {string} -- The column name. Keyword Arguments: nullable {bool} -- Whether the column is nullable. (default: {False}) Returns: self """ self._last_column = self.table.add_column( column, "macaddr", length=255, nullable=nullable ) return self
Thanks! Checked the item in the list!