Commit Graph

11 Commits

Author SHA1 Message Date
9f1dda2f02 DEV: Require created_at on users (#33033)
Add a table-level override to require `created_at` on `users` table
2025-06-02 14:08:38 +00:00
c31035caf5 DEV: Support nullable column property modification (#32978)
By default, rails makes timestamp columns (`created_at` and
`updated_at`) non-nullable, we also have some required core and plugins
columns we wouldn't necessarily want to enforce in the intermediate DB
schema. It'll be better to set the default values for these during
import instead of enforcing these at the converter level.

This change adds support for globally modifying a column’s `nullable`
state, defaulting all `created_at` columns to be `nullable` while
allowing for table level overrides.

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-06-01 22:39:18 +00:00
fc9946f595 DEV: Add converter & importer for permalink_normalizations 2025-05-31 22:17:44 +02:00
233c54b7fc DEV: Small API changes for interacting with PG during migrations (#32976) 2025-05-29 22:08:32 +02:00
ee4cb3915e FIX: Composite primary key output (#32972)
Ensure last column definition before a composite primary key definition
has a comma.
2025-05-28 17:45:48 +00:00
7c6b116dfd DEV: Adds a new converter for migrating from Discourse
It only contains a few user-related steps right now
2025-04-07 17:22:36 +02:00
17ba19c7ae REFACTOR: Code generator for migrations IntemerdiateDB
* Splits the existing script into multiple classes
* Adds command for generating IntermediateDB schema (`migrations/bin/cli schema generate`)
* Changes the syntax of the IntermediateDB schema config
* Adds validation for the schema config
* It uses YAML schema aka JSON schema to validate the config file
* It generates the SQL schema file and Ruby classes for storing data in the IntermediateDB
2025-04-07 17:22:36 +02:00
71a90dcba2 DEV: Refactor migrations-tooling
* Updates GitHub Action for migrations
* Rubocop: Always `EnforcedShorthandSyntax` for hashes in the `migrations` directory
* Automatically load all available converter steps
* Enable YJIT at runtime, if available
* Progressbar shows skipped records and other small improvements
2025-04-07 17:22:36 +02:00
2d05a82f52 DEV: Add Upload to IntermediateDB (#29780) 2025-01-20 23:16:30 +01:00
a48af2f120 DEV: Store details log entries in converter as JSON (#29778)
Plus small DB related fixes
2024-11-19 23:54:00 +01:00
7c3a29c9d6 DEV: Add converter framework for migrations-tooling (#28540)
* Updates GitHub Actions
* Switches from `bundler/inline` to an optional group in the `Gemfile` because the previous solution didn't work well with rspec
* Adds the converter framework and tests
* Allows loading private converters (see README)
* Switches from multiple CLI tools to a single CLI
* Makes DB connections reusable and adds a new abstraction for the `IntermediateDB`
* `IntermediateDB` acts as an interface for IPC calls when a converter steps runs in parallel (forks). Only the main process writes to the DB.
* Includes a simple example implementation of a converter for now.
2024-09-09 17:14:39 +02:00