Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: split user data from feed data #1706

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SMillerDev
Copy link
Contributor

First draft of the work to split the user data from the feed data. I'd especially like to know if I missed any user data in the feeds.

@Grotax
Copy link
Member

Grotax commented Mar 19, 2022

Oh that's cool 😎

@Grotax
Copy link
Member

Grotax commented Mar 19, 2022

I don't think you missed any.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Apr 16, 2022
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
$item_table = $qb->getTableName('news_items');
$feed_table = $qb->getTableName('news_feeds');

$items_query = "REPLACE INTO $user_item_table SELECT id AS 'item_id', ? AS 'user_id',`unread`,`starred`,`last_modified`,`shared_by` FROM $item_table where feed_id = ?;";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might have to find a different solution here, since PostgreSQL doesn't have REPLACE INTO statements.
Alternatively, you could check the database type and use another suitable statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants