Quantcast
Channel: MySQL Forums - MySQL Workbench
Viewing all articles
Browse latest Browse all 3739

MySQL Workbench updates columns which shouldn't be changed (no replies)

$
0
0
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

Viewing all articles
Browse latest Browse all 3739

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>