DEFAULT values are not migrated.
See original GitHub issueHi, once more issue. MySQL table:
| CREATE TABLE `rates_v2` (
`host` varchar(20) NOT NULL,
`rate` varchar(20) NOT NULL DEFAULT '',
`added` datetime DEFAULT NULL,
`new` set('N','Y') DEFAULT 'Y',
`longweek` datetime DEFAULT NULL,
`longmonth` datetime DEFAULT NULL,
`updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`hostId` tinyint(3) unsigned NOT NULL DEFAULT '1',
`foreign_key` set('N','Y') DEFAULT 'Y',
PRIMARY KEY (`host`,`hostId`,`rate`),
KEY `Host` (`hostId`),
KEY `rateTableNameIndex` (`new`,`rate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
r=> \d+ rates_v2;
Table "rates_v2"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
-------------+-----------------------------+-----------+----------+---------+----------+--------------+-------------
host | character varying(20) | | not null | | extended | |
rate | character varying(20) | | not null | | extended | |
added | timestamp without time zone | | | | plain | |
new | text | | | | extended | |
longweek | timestamp without time zone | | | | plain | |
longmonth | timestamp without time zone | | | | plain | |
updated | timestamp without time zone | | not null | | plain | |
hostId | integer | | not null | | plain | |
foreign_key | text | | | | extended | |
As you can see, for the row updated, DEFAULT value CURRENT_TIMESTAMP from MySQL did not migrated into PostgreSQL.
If chameleon is able to resolve this issue right now, or I have to wait for new release? Thanks for answer.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
c# - Default value does not work in entity framework code first ...
1 Answer 1 ... The default values aren't retrospectively added for existing records when adding new column to an existing table. You can...
Read more >constraint is not migrated from SQL server to Snowflake by ...
Table in SQL server source has a Default constraint but when DBMI task is run, default values from source are migrated to Snowflake...
Read more >Default value for WebformLikert webform element is not ...
Default value for WebformLikert webform element is not migrated properly ; Needs review ; Project: Webform: Migrate ; Version: 8.x-1.x-dev.
Read more >Attribute default values: Migrating from SDKv2 to the Framework
Specify a default when the Terraform configuration does not supply a value for attributes. Migrate attribute defaults in SDKv2 to AttributePlanModifier in ...
Read more >Troubleshooting migration tasks in AWS Database Migration ...
For example, it doesn't create secondary indexes, non-primary key constraints, or data defaults. To migrate secondary objects from your database, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I also came across this today while using a replicated database after running
chameleon detach_replica. It seems everything comes across absolutely fine - all except the default values.Definition of default value for table column still not replicated