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

Chuck/dev/reset schema #155

Merged
merged 53 commits into from
Feb 1, 2025
Merged

Chuck/dev/reset schema #155

merged 53 commits into from
Feb 1, 2025

Conversation

chuckadams
Copy link
Contributor

Pull Request

What changed?

  • Migrations have all been rolled into a minimal set. This necessitates a db reset with make init, which means you'll need to regenerate API keys (I'll back up and restore the users and tokens on prod to minimize disruption)
  • Migrations now assume Postgres, in that all varchar columns are now text columns without limits (which is the only kind of varchar postgres has anyway). SQLite could probably cope with this schema too, but not when I start adding support for trigrams, so unless until we need sqlite support, I'm leaving it at pg-only.
  • all jsonb columns except ac_raw_metadata are removed, attributes have been added to Plugin and Theme to make the former columns computed from the raw column. This should be transparent to most uses.
  • As a side effect of using computed attributes, all url rewriting is now done on the fly in the accessors. I'm pondering moving the rewrite logic elsewhere, but it can stay there for the time being.

Why did it change?

The meandering saga of our database migrations includes the AspireSync tables and various missteps and corrections. I'd like something I can easily search with my IDE without the results being full of red herrings.

Normalizing the tables to use the computed attributes makes things like PluginProps and ThemeProps smaller and simpler. It does remove the ability to declare every last bit of plugin state in the constructor, but we can still parse metadata the same way as before.

Did you fix any specific issues?

closes: #125
closes: #126

CERTIFICATION

By opening this pull request, I do agree to abide by the Code of Conduct and be bound by the terms of the Contribution Guidelines in effect on the date and time of my contribution as proven by the revision information in GitHub.

@chuckadams chuckadams merged commit e90cfd5 into main Feb 1, 2025
1 check passed
@chuckadams chuckadams deleted the chuck/dev/reset-schema branch February 1, 2025 17:55
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.

skinnier plugins and themes tables migrations rollup
1 participant