1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/moncycle_ynh.git synced 2024-09-03 19:46:16 +02:00
moncycle_ynh/conf/migrate_13.0.6.sql
2024-07-15 13:28:13 +07:00

13 lines
No EOL
2 KiB
SQL

delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
delete a from observation a join (select no_observation from observation group by date_obs, no_compte having count(no_observation)>1) b on a.no_observation = b.no_observation;
alter table observation add constraint unique_compte_and_date unique (no_compte, date_obs);