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

Migrate audit list to gravity.db database table #2832

Merged
merged 14 commits into from
Jul 11, 2019

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jul 5, 2019

By submitting this pull request, I confirm the following:
please fill any appropriate checkboxes, e.g: [X]

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes, and have included unit tests where possible.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)

Please make sure you Sign Off all commits. Pi-hole enforces the DCO.


What does this PR aim to accomplish?:

Migrate the list of audited domains into the gravity.db database

How does this PR accomplish the above?:

Well, see above.

What documentation changes (if any) are needed to support this PR?:

The database documentation needs to be extended. This will be done in a follow-up PR.

DL6ER added 5 commits July 5, 2019 13:54
Signed-off-by: DL6ER <dl6er@dl6er.de>
…bility to add multiple rows within one INSERT clause. This is supported since sqlite3 3.7.11 (2012-03-20) and should be available on all systems.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER added this to the v5.0 milestone Jul 5, 2019
Signed-off-by: DL6ER <dl6er@dl6er.de>
advanced/Scripts/database_migration/gravity-db.sh Outdated Show resolved Hide resolved
advanced/Scripts/database_migration/gravity/1_to_2.sql Outdated Show resolved Hide resolved
advanced/Scripts/webpage.sh Outdated Show resolved Hide resolved
advanced/Templates/gravity.db.sql Outdated Show resolved Hide resolved
gravity.sh Outdated Show resolved Hide resolved
gravity.sh Outdated Show resolved Hide resolved
gravity.sh Outdated Show resolved Hide resolved
DL6ER added 2 commits July 6, 2019 09:32
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
DL6ER added 2 commits July 7, 2019 10:33
…ion of gravity.db auditlog.list on database upgrade from version 1 to 2.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
advanced/Scripts/webpage.sh Show resolved Hide resolved
advanced/Scripts/webpage.sh Outdated Show resolved Hide resolved
advanced/Scripts/webpage.sh Outdated Show resolved Hide resolved
@DL6ER DL6ER marked this pull request as ready for review July 8, 2019 05:57
Signed-off-by: DL6ER <dl6er@dl6er.de>
advanced/Scripts/database_migration/gravity-db.sh Outdated Show resolved Hide resolved
advanced/Scripts/webpage.sh Outdated Show resolved Hide resolved
gravity.sh Outdated Show resolved Hide resolved
Signed-off-by: DL6ER <dl6er@dl6er.de>
@AzureMarker
Copy link
Contributor

We should add a timeout to the SQLite commands we run.

  [✓] Restarting pihole-FTL service...
Error: near line 1: database is locked
Error: near line 8: database is locked
  [i] Migrating content of /etc/pihole/auditlog.list into new database

  [✗] Unable to truncate domain_audit database /etc/pihole/gravity.db
  Error: near line 1: no such table: domain_audit

Signed-off-by: DL6ER <dl6er@dl6er.de>
@AzureMarker AzureMarker merged commit 445127a into development Jul 11, 2019
@AzureMarker AzureMarker deleted the new/audit_database branch July 11, 2019 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants