Three columns in my DB are as shown below:
MariaDB [testdb]> explain points;
+------------+---------------+------+-----+----------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------+------+-----+----------+----------------+
| slope | decimal(12,6) | NO | | 1.000000 | |
+------------+---------------+------+-----+----------+----------------+
11 rows in set (0.00 sec)
MariaDB [testdb]> explain testing;
+------------+-----------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-----------+------+-----+---------------------+----------------+
| timestamp | timestamp | NO | | current_timestamp() | |
+------------+-----------+------+-----+---------------------+----------------+
6 rows in set (0.00 sec)
MariaDB [testdb]> explain guids;
+------------+-----------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-----------+------+-----+---------------------+----------------+
| timestamp | timestamp | NO | | current_timestamp() | |
+------------+-----------+------+-----+---------------------+----------------+
4 rows in set (0.00 sec)
MariaDB [testdb]>
And then when I use MySQL Workbench (latest version 6.3.9) to synchronize the model with the database, it does the following:
ALTER TABLE `testdb`.`points`
CHANGE COLUMN `slope` `slope` DECIMAL(12,6) NOT NULL DEFAULT 1 ;
ALTER TABLE `testdb`.`testing`
CHANGE COLUMN `timestamp` `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ;
ALTER TABLE `testdb`.`guids`
CHANGE COLUMN `timestamp` `timestamp` TIMESTAMP NOT NULL ;
Why are they being updated? I know it is petty, but it just bugs me.
Functions and triggers also get updated, but this seems to bug me less.
Thank you
MariaDB [testdb]> explain points;
+------------+---------------+------+-----+----------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------+------+-----+----------+----------------+
| slope | decimal(12,6) | NO | | 1.000000 | |
+------------+---------------+------+-----+----------+----------------+
11 rows in set (0.00 sec)
MariaDB [testdb]> explain testing;
+------------+-----------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-----------+------+-----+---------------------+----------------+
| timestamp | timestamp | NO | | current_timestamp() | |
+------------+-----------+------+-----+---------------------+----------------+
6 rows in set (0.00 sec)
MariaDB [testdb]> explain guids;
+------------+-----------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-----------+------+-----+---------------------+----------------+
| timestamp | timestamp | NO | | current_timestamp() | |
+------------+-----------+------+-----+---------------------+----------------+
4 rows in set (0.00 sec)
MariaDB [testdb]>
And then when I use MySQL Workbench (latest version 6.3.9) to synchronize the model with the database, it does the following:
ALTER TABLE `testdb`.`points`
CHANGE COLUMN `slope` `slope` DECIMAL(12,6) NOT NULL DEFAULT 1 ;
ALTER TABLE `testdb`.`testing`
CHANGE COLUMN `timestamp` `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ;
ALTER TABLE `testdb`.`guids`
CHANGE COLUMN `timestamp` `timestamp` TIMESTAMP NOT NULL ;
Why are they being updated? I know it is petty, but it just bugs me.
Functions and triggers also get updated, but this seems to bug me less.
Thank you