aboutsummaryrefslogtreecommitdiffstats
path: root/install/migrate_mypg_fixseq.sql
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2014-11-17 15:15:02 -0800
committerHabeas Codice <habeascodice@federated.social>2014-11-17 15:15:02 -0800
commit96427a23a3523daf2c1966fe1b8a6e119e797e50 (patch)
treea7aaea69271817bbc8f78396f0d98052ca52d3f3 /install/migrate_mypg_fixseq.sql
parentbcaa32a83a965f111bfc2ba085a59857a4fa0c2d (diff)
parente59f7cc198fb038cd8344c2d403b423d57300a96 (diff)
downloadvolse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.tar.gz
volse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.tar.bz2
volse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.zip
Merge branch 'master' of https://github.com/habeascodice/red
Diffstat (limited to 'install/migrate_mypg_fixseq.sql')
-rw-r--r--install/migrate_mypg_fixseq.sql55
1 files changed, 55 insertions, 0 deletions
diff --git a/install/migrate_mypg_fixseq.sql b/install/migrate_mypg_fixseq.sql
new file mode 100644
index 000000000..806c5cf31
--- /dev/null
+++ b/install/migrate_mypg_fixseq.sql
@@ -0,0 +1,55 @@
+ SELECT SETVAL('public.abook_abook_id_seq', COALESCE(MAX(abook_id), 1) ) FROM public.abook;
+ SELECT SETVAL('public.account_account_id_seq', COALESCE(MAX(account_id), 1) ) FROM public.account;
+ SELECT SETVAL('public.addon_id_seq', COALESCE(MAX(id), 1) ) FROM public.addon;
+ SELECT SETVAL('public.app_id_seq', COALESCE(MAX(id), 1) ) FROM public.app;
+ SELECT SETVAL('public.attach_id_seq', COALESCE(MAX(id), 1) ) FROM public.attach;
+ SELECT SETVAL('public.channel_channel_id_seq', COALESCE(MAX(channel_id), 1) ) FROM public.channel;
+ SELECT SETVAL('public.chat_chat_id_seq', COALESCE(MAX(chat_id), 1) ) FROM public.chat;
+ SELECT SETVAL('public.chatpresence_cp_id_seq', COALESCE(MAX(cp_id), 1) ) FROM public.chatpresence;
+ SELECT SETVAL('public.chatroom_cr_id_seq', COALESCE(MAX(cr_id), 1) ) FROM public.chatroom;
+ SELECT SETVAL('public.config_id_seq', COALESCE(MAX(id), 1) ) FROM public.config;
+ SELECT SETVAL('public.conv_id_seq', COALESCE(MAX(id), 1) ) FROM public.conv;
+ SELECT SETVAL('public.event_id_seq', COALESCE(MAX(id), 1) ) FROM public.event;
+ SELECT SETVAL('public.fcontact_id_seq', COALESCE(MAX(id), 1) ) FROM public.fcontact;
+ SELECT SETVAL('public.ffinder_id_seq', COALESCE(MAX(id), 1) ) FROM public.ffinder;
+ SELECT SETVAL('public.fserver_id_seq', COALESCE(MAX(id), 1) ) FROM public.fserver;
+ SELECT SETVAL('public.fsuggest_id_seq', COALESCE(MAX(id), 1) ) FROM public.fsuggest;
+ SELECT SETVAL('public.group_member_id_seq', COALESCE(MAX(id), 1) ) FROM public.group_member;
+ SELECT SETVAL('public.groups_id_seq', COALESCE(MAX(id), 1) ) FROM public.groups;
+ SELECT SETVAL('public.hook_id_seq', COALESCE(MAX(id), 1) ) FROM public.hook;
+ SELECT SETVAL('public.hubloc_hubloc_id_seq', COALESCE(MAX(hubloc_id), 1) ) FROM public.hubloc;
+ SELECT SETVAL('public.issue_issue_id_seq', COALESCE(MAX(issue_id), 1) ) FROM public.issue;
+ SELECT SETVAL('public.item_id_id_seq', COALESCE(MAX(id), 1) ) FROM public.item_id;
+ SELECT SETVAL('public.item_id_seq', COALESCE(MAX(id), 1) ) FROM public.item;
+ SELECT SETVAL('public.likes_id_seq', COALESCE(MAX(id), 1) ) FROM public.likes;
+ SELECT SETVAL('public.mail_id_seq', COALESCE(MAX(id), 1) ) FROM public.mail;
+ SELECT SETVAL('public.manage_id_seq', COALESCE(MAX(id), 1) ) FROM public.manage;
+ SELECT SETVAL('public.menu_item_mitem_id_seq', COALESCE(MAX(mitem_id), 1) ) FROM public.menu_item;
+ SELECT SETVAL('public.menu_menu_id_seq', COALESCE(MAX(menu_id), 1) ) FROM public.menu;
+ SELECT SETVAL('public.notify_id_seq', COALESCE(MAX(id), 1) ) FROM public.notify;
+ SELECT SETVAL('public.obj_obj_id_seq', COALESCE(MAX(obj_id), 1) ) FROM public.obj;
+ SELECT SETVAL('public.pconfig_id_seq', COALESCE(MAX(id), 1) ) FROM public.pconfig;
+ SELECT SETVAL('public.photo_id_seq', COALESCE(MAX(id), 1) ) FROM public.photo;
+ SELECT SETVAL('public.poll_elm_pelm_id_seq', COALESCE(MAX(pelm_id), 1) ) FROM public.poll_elm;
+ SELECT SETVAL('public.poll_poll_id_seq', COALESCE(MAX(poll_id), 1) ) FROM public.poll;
+ SELECT SETVAL('public.profdef_id_seq', COALESCE(MAX(id), 1) ) FROM public.profdef;
+ SELECT SETVAL('public.profext_id_seq', COALESCE(MAX(id), 1) ) FROM public.profext;
+ SELECT SETVAL('public.profile_check_id_seq', COALESCE(MAX(id), 1) ) FROM public.profile_check;
+ SELECT SETVAL('public.profile_id_seq', COALESCE(MAX(id), 1) ) FROM public.profile;
+ SELECT SETVAL('public.register_id_seq', COALESCE(MAX(id), 1) ) FROM public.register;
+ SELECT SETVAL('public.session_id_seq', COALESCE(MAX(id), 1) ) FROM public.session;
+ SELECT SETVAL('public.shares_share_id_seq', COALESCE(MAX(share_id), 1) ) FROM public.shares;
+ SELECT SETVAL('public.sign_id_seq', COALESCE(MAX(id), 1) ) FROM public.sign;
+ SELECT SETVAL('public.source_src_id_seq', COALESCE(MAX(src_id), 1) ) FROM public.source;
+ SELECT SETVAL('public.spam_id_seq', COALESCE(MAX(id), 1) ) FROM public.spam;
+ SELECT SETVAL('public.sys_perms_id_seq', COALESCE(MAX(id), 1) ) FROM public.sys_perms;
+ SELECT SETVAL('public.term_tid_seq', COALESCE(MAX(tid), 1) ) FROM public.term;
+ SELECT SETVAL('public.updates_ud_id_seq', COALESCE(MAX(ud_id), 1) ) FROM public.updates;
+ SELECT SETVAL('public.verify_id_seq', COALESCE(MAX(id), 1) ) FROM public.verify;
+ SELECT SETVAL('public.vote_vote_id_seq', COALESCE(MAX(vote_id), 1) ) FROM public.vote;
+ SELECT SETVAL('public.xchat_xchat_id_seq', COALESCE(MAX(xchat_id), 1) ) FROM public.xchat;
+ SELECT SETVAL('public.xconfig_id_seq', COALESCE(MAX(id), 1) ) FROM public.xconfig;
+ SELECT SETVAL('public.xign_id_seq', COALESCE(MAX(id), 1) ) FROM public.xign;
+ SELECT SETVAL('public.xlink_xlink_id_seq', COALESCE(MAX(xlink_id), 1) ) FROM public.xlink;
+ SELECT SETVAL('public.xtag_xtag_id_seq', COALESCE(MAX(xtag_id), 1) ) FROM public.xtag;
+