https://github.com/expl0it3r/smf2flarum
Migration to for SMF (Simple Machine Forum) to Flarum
https://github.com/expl0it3r/smf2flarum
flarum forum migration smf
Last synced: over 1 year ago
JSON representation
Migration to for SMF (Simple Machine Forum) to Flarum
- Host: GitHub
- URL: https://github.com/expl0it3r/smf2flarum
- Owner: eXpl0it3r
- License: other
- Created: 2024-05-30T12:24:53.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T19:30:01.000Z (about 2 years ago)
- Last Synced: 2025-03-28T21:36:23.640Z (over 1 year ago)
- Topics: flarum, forum, migration, smf
- Language: C#
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# smf2flarum
This tool allows migrating the database for [SMF (Simple Machine Forum)](https://www.simplemachines.org/) to [Flarum](https://flarum.org/).
## Usage
```
smf2flarum --smf --flarum
```
## Architecture
The idea behind the tool is relatively simple:
- Generate the schemas of the databases via `dotnet ef dbcontext scaffold`
- Create AutoMapper profiles to map data from SMF to Flarum, including custom transformations
- Run the migration
Design decisions were made to keep the architecture extensible:
- The DB schemas are versioned, which could allow for migrations of different versions
- The DB schemas are limited to the default installations, while considering that fields from extensions/addons will need to be registered and migrated separately
## Extending
If you want to add your own schema versions, here are the commands used to generate the existing schemas:
```
dotnet tool install --global dotnet-ef
cd src/Schema
dotnet ef dbcontext scaffold "" MySql.EntityFrameworkCore -o -f
```
- `` could be something like `server=localhost;user id=flarum;password=;database=flarum`
- `` could be something like `Flarum185`, where `185` represents version 1.8.5 of Flarum
**Important:** Don't forget to remove the connection string credentials from the generated DB context!
## Credits
Some ideas have been inspired by the [smf2_to_flarum](https://github.com/ItalianSpaceAstronauticsAssociation/smf2_to_flarum) migration scripts.
### Dependencies
- [CommandLineParser](https://github.com/commandlineparser/commandline)
- [AutoMapper](https://github.com/AutoMapper/AutoMapper)
## License
This software is dual licensed under the Public Domain and the MIT license, choose whichever you prefer. See the LICENSE.md file for more details.