Jump to content

Move core_members_* to another mysql server..


Go to solution Solved by bfarber,

Recommended Posts

I understand that there is no out of the box solution, i'd like to understand how to correctly solve this problem. For example, in IPS\ActiveRecord\select a database connection based on the table name and add a new structure to IPS\Db for the second connection? I need your clue, you better understand the architecture of the system.

Link to comment
Share on other sites

I'm not confident this is going to be "simple". You can move the table to a remote database and then create a plugin on \IPS\Member to fetch from that remote database, however the bigger problem you'll face is that many, many areas of the software join the members table on to save queries, which wouldn't be possible with the table stored in a remote database. You would probably need to do a project search and change many, many core areas of the software (searching, fetching content items, fetching comments in content items, etc.) to account for the change.

Honestly, your better solution would be to just host your database entirely in Russia if this is a legal requirement.

Link to comment
Share on other sites

As far as I know, requirement to store personal data in Russia don't requires you to not store them outside of Russia in most cases. Thus said, you may to create another database for several tables in Russia and just keep it up to date with your main database. You can hook into multiple methods in the \IPS\Db class (insert, update, delete and so on) and run additional query to your Russian database each time it is ran to core_members_* in your main database.

But anyway you should consult with your lawyer and Roskomnadzor before doing this.

Link to comment
Share on other sites

Yep, already clone \IPS\Db and IPS\Select, add db selection to IPS\ActiveRecord, move table to another server and it works! :) This will be sufficient to keep the copy up to date and will give the provider the opportunity to honestly answer the question "Are there requests to the database from Germany?".

But as the bfarber correctly noted, the ips code has a huge number of direct calls and joins to this table, so the question can be considered closed, this is impossible.

Ilia, only one option: create the illusion of working with remote tables, so I will follow the path you proposed. 

1 hour ago, Ilya Hoilik said:

But anyway you should consult with your lawyer and Roskomnadzor before doing this.

Are you kidding? :) I'm too small for both lawyers and rkn. And certainly I'm not going to let rkn know about my plans.

Thank you all for your advice.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...