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

Add a selfoss CLI tool #1283

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Add a selfoss CLI tool #1283

wants to merge 3 commits into from

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Nov 3, 2021

This introduces two commands for dumping and loading the database contents:

  • php bin/selfoss db:export path.json
  • php bin/selfoss db:import path.json

Those are useful for testing, as well as for moving data from one database backend to another.

@jtojnar jtojnar force-pushed the console branch 5 times, most recently from c81bc12 to 9cbabd4 Compare November 3, 2021 07:33
@jtojnar
Copy link
Member Author

jtojnar commented Nov 3, 2021

Currently, datetimes exported from SQLite cannot be imported to MySQL, we need some normalization.

@jtojnar jtojnar added this to the 2.19 milestone Nov 3, 2021
@jtojnar jtojnar force-pushed the console branch 4 times, most recently from 366d738 to f0f41a8 Compare November 4, 2021 23:53
@jtojnar jtojnar marked this pull request as draft January 25, 2022 15:01
@jtojnar jtojnar removed this from the 2.19 milestone Sep 5, 2022
@jtojnar jtojnar added this to the 2.20 milestone Oct 7, 2022
@netlify
Copy link

netlify bot commented Feb 15, 2023

Deploy Preview for selfoss canceled.

Name Link
🔨 Latest commit acafe64
🔍 Latest deploy log https://app.netlify.com/sites/selfoss/deploys/6488def05d53630008bc6a6e

This introduces two commands for dumping and loading the database contents:

- `php bin/selfoss db:export path.json`
- `php bin/selfoss db:import path.json`

Those are useful for testing, as well as for moving data from one database backend to another.

Different databases support different formats of a datetime so we use ISO 8601 (“ATOM”) format as a normal form in the JSON file no matter the backend.
Similarly, we use arrays instead of comma-separated-values strings since different backends might choose to implement them differently (e.g. using JSON data types).
This will make it possible to GC memory when working with huge number of items.
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.

1 participant