db icon indicating copy to clipboard operation
db copied to clipboard

New concept of columns for version 2.0

Open Tigrov opened this issue 1 year ago • 0 comments

Main changes:

  • [x] 1. Realize TypeColumn classes (IntegerColumn, StringColumn, etc) #752
  • [x] 2. Realize ColumnFactory
  • [x] 3. Realize ColumnBuilder It also fixes yiisoft/db-mysql#249
  • [ ] 4. ~Add ColumnSchema::getDefinitionType() method to get full name of db type, e.g. varchar(20)~ #695
  • [x] 5. Realize ColumnDefinitionBuilder #599
  • [ ] 6. ~Remove pk abstract type constants ColumnSchemaInterface::...pk use ColumnBuilder::...pk() instead~ yiisoft/db-migration#6
  • [ ] 7. Replace ColumnSchema::name() with immutable ColumnSchema::withName()
  • [ ] 8. Remove ColumnSchema::precision() (use ColumnSchema::size() instead)
  • [ ] 9. ~Rename ColumnSchema::enumValues() to ColumnSchema::values()~ This allows use it for https://github.com/yiisoft/db-mysql/issues/330
  • [x] 10. Rename ColumnSchema::allowNull() to ColumnSchema::notNull() to be compatible with old Column::notNull()
  • [x] 11. Add isUnique(), check() and reference() to ColumnSchema to be compatible with old Column class
  • [ ] 12. Rename AbstractColumnSchema to Column (combine Column and ColumnSchema classes)

The changes will solve few issues and after related improvements it will solve few more issues. It will allow customize typecasting for table column.

There is a draft #808

Tigrov avatar Jun 22 '24 04:06 Tigrov