Diff Compare Schema does not 'on update CURRENT_TIMESTAMP'

Answered

Displayed Changes:

Change Set / Migration Script

Should be something like:

ALTER TABLE baustaell.vehicles ALTER COLUMN film SET DEFAULT 'Default';
ALTER TABLE baustaell.vehicles ADD lastUpdated TIMESTAMP NULL ON UPDATE CURRENT_TIMESTAMP;

DDL from source:

create table vehicles
(
id int(12) auto_increment
primary key,
side varchar(15) not null,
classname varchar(64) not null,
type varchar(12) not null,
pid varchar(32) not null,
alive tinyint(1) default '1' not null,
active tinyint(1) default '0' not null,
plate int(20) not null,
color varchar(50) not null,
insurance tinyint(1) not null,
film varchar(50) default 'Default' not null,
impounded tinyint(1) default '0' not null,
lastUpdated timestamp null on update CURRENT_TIMESTAMP
)
engine=InnoDB charset=latin1
;

create index side
on vehicles (side)
;

create index type
on vehicles (type)
;

create index pid
on vehicles (pid)
;

DDL from Target

create table vehicles
(
id int(12) auto_increment
primary key,
side varchar(15) not null,
classname varchar(64) not null,
type varchar(12) not null,
pid varchar(32) not null,
alive tinyint(1) default '1' not null,
active tinyint(1) default '0' not null,
plate int(20) not null,
color varchar(50) not null,
insurance tinyint(1) not null,
film varchar(50) default '''Default''' not null,
impounded tinyint(1) default '0' not null
)
engine=InnoDB charset=latin1
;

create index side
on vehicles (side)
;

create index type
on vehicles (type)
;

create index pid
on vehicles (pid)
;
1 comment
Comment actions Permalink

Hi! This kind of issues are better to handle in Youtrack: https://youtrack.jetbrains.com/issue/DBE-6164

0

Please sign in to leave a comment.