Skip to content

Unsigned is missing on the column data.#28

Merged
guilhermeblanco merged 1 commit intodoctrine:masterfrom
diegoholiveira:master
Jun 7, 2011
Merged

Unsigned is missing on the column data.#28
guilhermeblanco merged 1 commit intodoctrine:masterfrom
diegoholiveira:master

Conversation

@diegoholiveira
Copy link
Copy Markdown

Adding the option of unsigned field. I made this change after using doctrine-migrations and detect that the fields marked as unsigned was being ignored and generated as signed.

Example of what has been generated before this change:

++ migrating 20110527182534

 -> CREATE TABLE tb_user (id INT AUTO_INCREMENT NOT NULL, facebook BIGINT NOT NULL, first_name VARCHAR(45) NOT NULL, middle_name VARCHAR(45) DEFAULT NULL, last_name VARCHAR(45) NOT NULL, email VARCHAR(60) NOT NULL, gender VARCHAR(1) DEFAULT NULL, profile_url VARCHAR(120) DEFAULT NULL, access_role VARCHAR(30) NOT NULL, created_at DATETIME NOT NULL, last_visit DATETIME NOT NULL, UNIQUE INDEX UNIQUE_KEY_EMAIL (email), UNIQUE INDEX UNIQUE_KEY_FACEBOOK (facebook), PRIMARY KEY(id)) ENGINE = InnoDB

Example of what is generated now, after the change:

++ migrating 20110527182534

 -> CREATE TABLE tb_user (id INT UNSIGNED AUTO_INCREMENT NOT NULL, facebook BIGINT UNSIGNED NOT NULL, first_name VARCHAR(45) NOT NULL, middle_name VARCHAR(45) DEFAULT NULL, last_name VARCHAR(45) NOT NULL, email VARCHAR(60) NOT NULL, gender VARCHAR(1) DEFAULT NULL, profile_url VARCHAR(120) DEFAULT NULL, access_role VARCHAR(30) NOT NULL, created_at DATETIME NOT NULL, last_visit DATETIME NOT NULL, UNIQUE INDEX UNIQUE_KEY_EMAIL (email), UNIQUE INDEX UNIQUE_KEY_FACEBOOK (facebook), PRIMARY KEY(id)) ENGINE = InnoDB

guilhermeblanco added a commit that referenced this pull request Jun 7, 2011
Unsigned is missing on the column data.
@guilhermeblanco guilhermeblanco merged commit c73176c into doctrine:master Jun 7, 2011
morozov pushed a commit to morozov/dbal that referenced this pull request Jan 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants