Thanks to visit codestin.com
Credit goes to github.com

Skip to content

arima-ryunosuke/dbal

 
 

Repository files navigation

Doctrine DBAL

Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.

  • Master: Build Status Dependency Status
  • 2.5: Build Status Dependency Status
  • 2.4: Build Status Dependency Status
  • 2.3: Build Status Dependency Status

More resources:

Forked

from doctrine/dbal.

This forked repository has specialized mysql when comparing.

  • support TINYTEXT / TEXT / MEDIUMTEXT / LONGTEXT types when alter column type
  • support FIRST / AFTER suffix when add column
  • support TABLE OPTION (e.g. ROW_FORMAT, ENGINE etc) when create table, alter table
  • support SPATIAL types (e.g. POINT, GEOMETRY etc)
  • fix UPPERCASE index name when rename index

example:

-- from table
CREATE TABLE ExampleTable (
  id INT(10) UNSIGNED NOT NULL,
  seq INT(10) UNSIGNED NOT NULL,
  content TEXT NOT NULL COLLATE utf8_bin,
  PRIMARY KEY (id),
  INDEX INDEX1 (seq)
) Comment='comment_from' CHARSET=utf8 COLLATE='utf8_general_ci' ENGINE=InnoDB;

-- to table
CREATE TABLE ExampleTable (
  id INT(10) UNSIGNED NOT NULL,
  seq INT(10) UNSIGNED NOT NULL,
  name VARCHAR(64) NOT NULL,
  content MEDIUMTEXT NOT NULL COLLATE utf8_bin,
  PRIMARY KEY (id),
  INDEX INDEX2 (seq)
) Comment='comment_to' CHARSET=utf8 COLLATE='utf8_bin' ENGINE=MyISAM;
-- original comparing
ALTER TABLE ExampleTable
  ADD name VARCHAR(64) NOT NULL COLLATE utf8_bin
DROP INDEX index1 ON ExampleTable
CREATE INDEX INDEX2 ON ExampleTable (
  seq
)

-- forked comparing
ALTER TABLE ExampleTable
  ADD name VARCHAR(64) NOT NULL COLLATE utf8_bin AFTER seq,
  CHANGE content content MEDIUMTEXT NOT NULL COLLATE utf8_bin,
  ENGINE MyISAM COLLATE utf8_bin COMMENT 'comment_to'
DROP INDEX INDEX1 ON ExampleTable
CREATE INDEX INDEX2 ON ExampleTable (
  seq
)

About

Doctrine Database Abstraction Layer

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.3%
  • Other 0.7%