alter table formula_details modify val1 decimal(15,10);
ALTER TABLE user CHANGE name newname CHAR(32) NOT NULL DEFAULT '123';
ALTER TABLE user ALTER age SET DEFAUTL 18;
ALTER TABLE user ALTER age DROP DEFAULT;
ALTER TABLE `merchant_agings` ADD `aging_type` smallint DEFAULT 1 NOT NULL COMMENT '时效类型 1:小时 2:天';
ALTER TABLE `merchant_agings` COMMENT '商家时效';
CREATE TABLE `merchant_products` (
`id` INT(11) AUTO_INCREMENT PRIMARY KEY,
`merchant_id` INT(11) NOT NULL,
`merchant_name` VARCHAR(255) NOT NULL,
`product_name` VARCHAR(255) NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL
) ENGINE=INNODB;
INSERT INTO schema_migrations (version) VALUES ('20171027020112');
- grant tom with the password of 1234576 to access the users table:
grant all privileges on users.* to 'tom'@'%' identified by '123456';