Change permission group of the Inactive member

Bug and problem reporting

Moderators: hugo, alexandre, rmvanarkel

Post Reply
duric
Posts: 219
Joined: Mon Mar 19, 2007 8:49 pm
Contact:

Change permission group of the Inactive member

Post by duric »

Cyclos 3.6 RC1

Here's what happens when I try to change permission group of the Inactive member (naturally, member has already validated his email address):

An internal error in the Application occured...


Logged user admin - The Administration
Path /do/admin/changeMemberGroup
Parameters
comments= Member request
memberId= 4
newGroupId= 15

Java error details

org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
at nl.strohalm.cyclos.dao.accounts.AccountDAOImpl.insert(AccountDAOImpl.java:194)
at nl.strohalm.cyclos.dao.accounts.AccountDAOImpl.insert(AccountDAOImpl.java:85)
at nl.strohalm.cyclos.dao.BaseDAOImpl.insert(BaseDAOImpl.java:143)
at nl.strohalm.cyclos.services.accounts.MemberAccountHandler.create(MemberAccountHandler.java:111)
at nl.strohalm.cyclos.services.accounts.MemberAccountHandler.activate(MemberAccountHandler.java:71)
at nl.strohalm.cyclos.services.elements.ElementServiceImpl.handleAccounts(ElementServiceImpl.java:1671)
at nl.strohalm.cyclos.services.elements.ElementServiceImpl.changeMemberGroup(ElementServiceImpl.java:481)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at nl.strohalm.cyclos.aop.MessageAspect.removedFromBrokerGroupNotification(MessageAspect.java:1323)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at nl.strohalm.cyclos.aop.TraceAspect.executeAndLogAction(TraceAspect.java:207)
at nl.strohalm.cyclos.aop.TraceAspect.doTrace(TraceAspect.java:187)
at nl.strohalm.cyclos.aop.TraceAspect.trace(TraceAspect.java:97)
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy27.changeMemberGroup(Unknown Source)
at nl.strohalm.cyclos.controls.elements.ChangeElementGroupAction.formAction(ChangeElementGroupAction.java:90)
at nl.strohalm.cyclos.controls.BaseFormAction.handleSubmit(BaseFormAction.java:67)
at nl.strohalm.cyclos.controls.members.ChangeMemberGroupAction.handleSubmit(ChangeMemberGroupAction.java:61)
at nl.strohalm.cyclos.controls.BaseFormAction.executeAction(BaseFormAction.java:43)
at nl.strohalm.cyclos.controls.BaseAction.execute(BaseAction.java:176)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at nl.strohalm.cyclos.struts.CyclosRequestProcessor.processActionPerform(CyclosRequestProcessor.java:160)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.TransactionFilter.runInTransaction(TransactionFilter.java:190)
at nl.strohalm.cyclos.http.TransactionFilter.access$000(TransactionFilter.java:57)
at nl.strohalm.cyclos.http.TransactionFilter$1.doInTransaction(TransactionFilter.java:108)
at nl.strohalm.cyclos.http.TransactionFilter$1.doInTransaction(TransactionFilter.java:106)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at nl.strohalm.cyclos.http.TransactionFilter.execute(TransactionFilter.java:106)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.RequestThrottlingFilter.execute(RequestThrottlingFilter.java:96)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.EncodingFilter.execute(EncodingFilter.java:85)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.LoggedUserFilter.execute(LoggedUserFilter.java:75)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.SanitizerFilter.execute(SanitizerFilter.java:65)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.BatchUpdateException: Duplicate entry '8' for key 1
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2007)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1443)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 96 more
duric
Posts: 219
Joined: Mon Mar 19, 2007 8:49 pm
Contact:

Post by duric »

As an administrator, I have tried to create one member:



Logged user admin - The Administration
Path /do/admin/createMember
Parameters
confirmPassword= ***
groupId= 5
manualPassword= ***
member(broker)=
member(customValues).field= 1
member(customValues).hidden= false
member(customValues).value= bla,bla
member(email)= bla,bla
member(group)= 5
member(name)= bla,bla
member(user).password= ***
member(user).username= bla,bla
postAction= new
Java error details
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
at nl.strohalm.cyclos.dao.accounts.AccountDAOImpl.insert(AccountDAOImpl.java:194)
at nl.strohalm.cyclos.dao.accounts.AccountDAOImpl.insert(AccountDAOImpl.java:85)
at nl.strohalm.cyclos.dao.BaseDAOImpl.insert(BaseDAOImpl.java:143)
at nl.strohalm.cyclos.services.accounts.MemberAccountHandler.create(MemberAccountHandler.java:111)
at nl.strohalm.cyclos.services.accounts.MemberAccountHandler.activate(MemberAccountHandler.java:71)
at nl.strohalm.cyclos.services.elements.ElementServiceImpl.handleAccounts(ElementServiceImpl.java:1671)
at nl.strohalm.cyclos.services.elements.ElementServiceImpl.save(ElementServiceImpl.java:1828)
at nl.strohalm.cyclos.services.elements.ElementServiceImpl.register(ElementServiceImpl.java:1739)
at nl.strohalm.cyclos.services.elements.ElementServiceImpl.registerMemberByAdmin(ElementServiceImpl.java:854)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at nl.strohalm.cyclos.aop.TraceAspect.executeAndLogAction(TraceAspect.java:207)
at nl.strohalm.cyclos.aop.TraceAspect.doTrace(TraceAspect.java:187)
at nl.strohalm.cyclos.aop.TraceAspect.trace(TraceAspect.java:97)
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy27.registerMemberByAdmin(Unknown Source)
at nl.strohalm.cyclos.controls.members.CreateMemberAction.create(CreateMemberAction.java:119)
at nl.strohalm.cyclos.controls.elements.CreateElementAction.handleSubmit(CreateElementAction.java:142)
at nl.strohalm.cyclos.controls.BaseFormAction.executeAction(BaseFormAction.java:43)
at nl.strohalm.cyclos.controls.BaseAction.execute(BaseAction.java:176)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at nl.strohalm.cyclos.struts.CyclosRequestProcessor.processActionPerform(CyclosRequestProcessor.java:160)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.TransactionFilter.runInTransaction(TransactionFilter.java:190)
at nl.strohalm.cyclos.http.TransactionFilter.access$000(TransactionFilter.java:57)
at nl.strohalm.cyclos.http.TransactionFilter$1.doInTransaction(TransactionFilter.java:108)
at nl.strohalm.cyclos.http.TransactionFilter$1.doInTransaction(TransactionFilter.java:106)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at nl.strohalm.cyclos.http.TransactionFilter.execute(TransactionFilter.java:106)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.RequestThrottlingFilter.execute(RequestThrottlingFilter.java:96)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.EncodingFilter.execute(EncodingFilter.java:85)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.LoggedUserFilter.execute(LoggedUserFilter.java:75)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at nl.strohalm.cyclos.http.SanitizerFilter.execute(SanitizerFilter.java:65)
at nl.strohalm.cyclos.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.BatchUpdateException: Duplicate entry '9' for key 1
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2007)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1443)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 87 more
duric
Posts: 219
Joined: Mon Mar 19, 2007 8:49 pm
Contact:

Post by duric »

We think that most probably, problem is caused by something that was not cleaned properly

http://project.cyclos.org/forum/viewtopic.php?t=1056

when we executed Cyclos Clean Test Database Script.

--------

As after almost 3 months of waiting, we are finally ready to launch our completely renovated website in the next few days, any help would be very much appreciated... (for example, is there any other DB we need to clean)

Thanks in advance for your reply, best regards.
admin
Site Admin
Posts: 1423
Joined: Mon Jan 24, 2005 10:31 am

Post by admin »

Hi Duric,

It is difficult to see what is going wrong. There is some duplication in the database and I guess that is the clean db script that caused this. This is why we always suggest not to use this script for operational installations. The solution of these kinds of problems is normally simple but it needs to be looked at by a db expert.
duric
Posts: 219
Joined: Mon Mar 19, 2007 8:49 pm
Contact:

Post by duric »

Hi Hugo,

every time - before passing on to new version, we install a double Cyclos, test all functions and report all bugs (this is not so simple and require a lot of time). Unfortunately, no official "clean test database script" has been released with this version, so we have tried to make things possible...

I know that you are very busy at the moment, but if you could take a quick look at our database - we would be very grateful :roll:
admin
Site Admin
Posts: 1423
Joined: Mon Jan 24, 2005 10:31 am

Post by admin »

Hi Duric

Here is the correct script. Can you check if you used that one?
It is not sure what you are doing. But for critical installations it is better not to use the clean db script but create the database manually.
If you have still problems you can send me the db (in a zip file) so that we can have a look.


/*
* Cyclos 3.6 clean up script
* --------------------------
*
* WARNING!!!: Running this script over an existing Cyclos database will
* mercilessly delete all users, transactions and all related data,
* leaving only the configuration. Be careful when you use it.
* The only user that will be left is the default 'admin'.
*
* WARNING 2: After running this script, also remove the WEB-INF/indexes
* and WEB-INF/cache directories (if any) in order to prevent old data to be
* retrieved from searches.
*/

/* Delete data*/
begin;
delete from brokering_commission_status;
delete from brokerings;
delete from contacts;
delete from reference_history;
delete from refs;
delete from ad_interests;
delete from notification_preferences;
delete from images where subclass in ('ad', 'mbr');
delete from custom_field_values where subclass <> ('admin');
delete from custom_field_values where admin_id <> 1;
delete from alerts;
delete from error_log_entry_parameters;
delete from error_log_entries;
delete from admin_alert_notification_preferences;
delete from admin_preferences_new_members;
delete from admin_preferences_message_categories;
delete from admin_preferences_transfer_types;
delete from admin_preferences_new_pending_payments;
delete from admin_preferences_guarantee_types;
delete from admin_notification_preferences;
update transfers set by_id = null, parent_id = null, transaction_fee_id = null, loan_payment_id = null, account_fee_log_id = null, fee_id = null, receiver_id = null, external_transfer_id = null, chargeback_of_id = null;
update account_fees set enabled_since = current_date where enabled_since is not null;
delete from member_account_fee_logs;
delete from invoice_payments;
delete from invoices;
delete from account_status;
delete from account_fee_charges;
delete from account_fee_logs;
delete from external_transfers;
delete from loan_payments;
delete from members_loans;
delete from payment_obligation_logs;
delete from payment_obligations;
delete from guarantee_logs;
delete from guarantees;
delete from certification_logs;
delete from certifications;
delete from loans;
delete from tickets;
delete from transfer_authorizations;
delete from transfers;
delete from scheduled_payments;
delete from accounts where subclass = 'M';
delete from operator_groups_max_amount;
delete from members_loan_groups;
delete from members_loans;
delete from loan_groups;
delete from ads;
delete from login_history;
delete from remarks;
delete from group_history_logs;
delete from password_history;
delete from username_change_logs;
delete from users where username not in ('admin');
delete from messages_to_groups;
delete from messages;
update members set member_broker_id = null, member_id = null;
update groups set member_id = null;
delete from members_channels;
delete from member_records;
delete from pending_members;
delete from transaction_fees where from_member_id is not null or to_member_id is not null;
delete from custom_field_values where field_id in (select id from custom_fields where member_id is not null);
delete from custom_field_possible_values where field_id in (select id from custom_fields where member_id is not null);
delete from custom_fields where member_id is not null;
delete from documents where member_id is not null;
delete from registration_agreement_logs;
create table clients_to_remove select id from service_clients where member_id is not null;
delete from service_client_permissions where service_client_id in (select id from clients_to_remove);
delete from service_clients_receive_payment_types where service_client_id in (select id from clients_to_remove);
delete from service_clients_do_payment_types where service_client_id in (select id from clients_to_remove);
delete from service_clients_manage_groups where service_client_id in (select id from clients_to_remove);
delete from service_clients where id in (select id from clients_to_remove);
drop table clients_to_remove;
delete from custom_field_values where field_id in (select id from custom_fields where transfer_type_id in (select id from transfer_types where fixed_destination_member_id is not null));
delete from custom_field_possible_values where field_id in (select id from custom_fields where transfer_type_id in (select id from transfer_types where fixed_destination_member_id is not null));
delete from custom_fields where transfer_type_id in (select id from transfer_types where fixed_destination_member_id is not null);
delete from transfer_types_channels where transfer_type_id in (select id from transfer_types where fixed_destination_member_id is not null);
delete from groups_chargeback_transfer_types where transfer_type_id in (select id from transfer_types where fixed_destination_member_id is not null);
delete from groups_transfer_types where transfer_type_id in (select id from transfer_types where fixed_destination_member_id is not null);
delete from groups_transfer_types_as_member where transfer_type_id in (select id from transfer_types where fixed_destination_member_id is not null);
delete from transfer_types where fixed_destination_member_id is not null;
update pos set member_pos_id = null;
delete from member_pos;
delete from pos_logs;
delete from pos;
delete from card_logs;
delete from cards;
delete from sms_logs;
delete from member_sms_status;
delete from sms_mailings_groups;
delete from sms_mailings;
delete from members where id not in (select id from users);
delete from permissions where group_id in (select id from groups where subclass = 'O');
delete from groups_transfer_types where group_id in (select id from groups where subclass = 'O');
delete from files where group_id in (select id from groups where subclass = 'O');
delete from group_operator_account_information_permissions;
delete from groups where subclass = 'O';
/* Reset the auto increment value */
alter table account_status auto_increment=1;
alter table account_fee_charges auto_increment=1;
alter table brokerings auto_increment=1;
alter table contacts auto_increment=1;
alter table reference_history auto_increment=1;
alter table refs auto_increment=1;
alter table ad_interests auto_increment=1;
alter table notification_preferences auto_increment=1;
alter table images auto_increment=1;
alter table custom_field_values auto_increment=1;
alter table custom_field_values auto_increment=1;
alter table alerts auto_increment=1;
alter table error_log_entry_parameters auto_increment=1;
alter table error_log_entries auto_increment=1;
alter table admin_alert_notification_preferences auto_increment=1;
alter table admin_preferences_message_categories auto_increment=1;
alter table admin_preferences_transfer_types auto_increment=1;
alter table admin_notification_preferences auto_increment=1;
alter table account_fee_logs auto_increment=1;
alter table invoices auto_increment=1;
alter table external_transfers auto_increment=1;
alter table payment_obligation_logs auto_increment=1;
alter table payment_obligations auto_increment=1;
alter table guarantee_logs auto_increment=1;
alter table guarantees auto_increment=1;
alter table certification_logs auto_increment=1;
alter table certifications auto_increment=1;
alter table loan_payments auto_increment=1;
alter table loans auto_increment=1;
alter table tickets auto_increment=1;
alter table transfers auto_increment=1;
alter table accounts auto_increment=1;
alter table groups auto_increment=1;
alter table operator_groups_max_amount auto_increment=1;
alter table group_history_logs auto_increment=1;
alter table members_loan_groups auto_increment=1;
alter table members_loans auto_increment=1;
alter table loan_groups auto_increment=1;
alter table ads auto_increment=1;
alter table login_history auto_increment=1;
alter table remarks auto_increment=1;
alter table messages auto_increment=1;
alter table member_pos auto_increment=1;
alter table pos_logs auto_increment=1;
alter table pos auto_increment=1;
alter table card_logs auto_increment=1;
alter table cards auto_increment=1;
alter table members auto_increment=2;
delete from account_locks;
insert into account_locks select id from accounts;
commit;
duric
Posts: 219
Joined: Mon Mar 19, 2007 8:49 pm
Contact:

Post by duric »

Hi Hugo,
thank you very much...

We have used "Cyclos 3.5 clean up script"

http://project.cyclos.org/forum/viewtop ... 9519a7a9fc

We will make a try with the "Cyclos 3.6 clean up script" tomorrow - I will let you know the result...
duric
Posts: 219
Joined: Mon Mar 19, 2007 8:49 pm
Contact:

Post by duric »

New script successfully executed - everything has returned to normal.
Muchas grazias for help Hugo :) :) :) :)
hugo
Posts: 633
Joined: Sun Jun 18, 2006 1:40 pm

Post by hugo »

De nada :)
jaime

thumbs up

Post by jaime »

:D
Post Reply