Skip to content

migrate sqlite db users table to a per-maildir "password" file#379

Merged
hpk42 merged 6 commits intohpk/last-loginfrom
hpk/db_to_maildir
Jul 25, 2024
Merged

migrate sqlite db users table to a per-maildir "password" file#379
hpk42 merged 6 commits intohpk/last-loginfrom
hpk/db_to_maildir

Conversation

@hpk42
Copy link
Copy Markdown
Contributor

@hpk42 hpk42 commented Jul 23, 2024

  • set/read passwords from a "password" file in maildir
  • set/read passwords for echobot from a special password file created by the echobot
  • track last_login for a user as the "mtime" of the password file
  • migration script for sqlite database to files (moving the old passdb.sqlite to passdb.sqlite.old)
  • new "User" object for manipulating passwords and last-login timestamp for a user with tests

supersedes #354 (this PR is based on it, but it's better to merge it all in one go, to not have partial db->file migrations)

@hpk42 hpk42 force-pushed the hpk/db_to_maildir branch 4 times, most recently from 4ac96bc to ee3c81c Compare July 23, 2024 22:47
@missytake
Copy link
Copy Markdown
Contributor

Can you maybe change the HEAD this PR is to be merged into to #354? It would be easier to review then - first we could review #354, then this one, then merge this, and then (possibly without further review) #354. Breaks it up into smaller chunks

@hpk42 hpk42 changed the base branch from main to hpk/last-login July 24, 2024 09:34
@hpk42
Copy link
Copy Markdown
Contributor Author

hpk42 commented Jul 24, 2024

Can you maybe change the HEAD this PR is to be merged into to #354? It would be easier to review then - first we could review #354, then this one, then merge this, and then (possibly without further review) #354. Breaks it up into smaller chunks

I re-targeted the branch to merge with hpk/last-login which was already reviewed.
Note btw, that even though there is a large "migrate_from_db_to_maildir" script with a large test,
this PR cuts out lines because all the sqlite-handling is gone.

Comment thread chatmaild/src/chatmaild/migrate_db.py Outdated
Comment thread chatmaild/src/chatmaild/tests/test_delete_inactive_users.py
@hpk42 hpk42 force-pushed the hpk/db_to_maildir branch from ee3c81c to 90adddf Compare July 25, 2024 07:49
@hpk42 hpk42 merged commit 45a89de into hpk/last-login Jul 25, 2024
@hpk42 hpk42 deleted the hpk/db_to_maildir branch July 25, 2024 11:04
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.

3 participants