Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-lizner committed Oct 6, 2015
2 parents 526980a + 3bbab27 commit 6e4dd26
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
4 changes: 1 addition & 3 deletions config/sql/_all/h2-upgrade-3.2-3.3.sql
Expand Up @@ -24,14 +24,12 @@ alter table m_focus_photo
references m_focus;


alter table m_focus add hasPhoto boolean not null default false after validityStatus;
alter table m_focus add hasPhoto boolean not null default false;

update m_focus set hasPhoto = false;
update m_focus set hasPhoto = (select hasPhoto from m_user where m_user.oid = m_focus.oid)
where m_focus.oid in (select oid from m_user);

-- don't know how to drop default value, leaving it there

alter table m_user drop column hasPhoto;


Expand Down
2 changes: 0 additions & 2 deletions config/sql/_all/mysql-upgrade-3.2-3.3.sql
Expand Up @@ -23,8 +23,6 @@ update m_focus set hasPhoto = 0;
update m_focus set hasPhoto = (select hasPhoto from m_user where m_user.oid = m_focus.oid)
where m_focus.oid in (select oid from m_user);

alter table m_focus alter column hasPhoto drop default;

alter table m_user drop column hasPhoto;

alter table m_focus_photo
Expand Down
1 change: 0 additions & 1 deletion config/sql/_all/oracle-upgrade-3.2-3.3.sql
Expand Up @@ -29,6 +29,5 @@ alter table m_focus add hasPhoto number(1,0) default 0 not null;
update m_focus set hasPhoto = 0;
update m_focus set hasPhoto = (select hasPhoto from m_user where m_user.oid = m_focus.oid)
where m_focus.oid in (select oid from m_user);
alter table m_focus modify hasPhoto default null;

alter table m_user drop column hasPhoto;
1 change: 0 additions & 1 deletion config/sql/_all/postgresql-upgrade-3.2-3.3.sql
Expand Up @@ -19,7 +19,6 @@ alter table m_focus add hasPhoto boolean not null default FALSE;
update m_focus set hasPhoto = false;
update m_focus set hasPhoto = (select hasPhoto from m_user where m_user.oid = m_focus.oid)
where m_focus.oid in (select oid from m_user);
alter table m_focus alter column hasPhoto drop default;

alter table m_focus_photo
drop constraint m_user_photo_pkey;
Expand Down
2 changes: 0 additions & 2 deletions config/sql/_all/sqlserver-upgrade-3.2-3.3.sql
Expand Up @@ -21,8 +21,6 @@ update m_focus set hasPhoto = 0;
update m_focus set hasPhoto = (select hasPhoto from m_user where m_user.oid = m_focus.oid)
where m_focus.oid in (select oid from m_user);

alter table m_focus drop constraint default_constraint;

alter table m_user drop column hasPhoto;

alter table m_focus_photo
Expand Down

0 comments on commit 6e4dd26

Please sign in to comment.