Here is a shell session showing what the new documenation looks like:
vagrant@discourse:~/vagrant$ bundle exec ruby ./script/discourse remap
ERROR: "discourse remap" was called with no arguments
Usage: "discourse remap [--global,--regex] FROM TO"
vagrant@discourse:~/vagrant$ bundle exec ruby ./script/discourse help remap
Usage:
discourse remap [--global,--regex] FROM TO
Options:
[--global], [--no-global]
[--regex], [--no-regex]
v, [--verbose=VERBOSE]
Description:
Replace a string sequence FROM with TO across all tables.
With --global option, the remapping is run on ***ALL*** databases. Instead of just running on the current database, run on every database on this machine. This option is useful for multi-site setups.
With --regex option, use PostgreSQL function regexp_replace to do the remapping. Enabling this interprets FROM as a PostgreSQL regular expression. TO can contain references to captures in the FROM match. See the "Regular Expression
Details" section and "regexp_replace" documentation in the PostgreSQL manual for more details.
Examples:
discourse remap talk.foo.com talk.bar.com # renaming a Discourse domain name
discourse remap --regex "[/?color(=[^]]*)*]" "" # removing "color" bbcodes
This adds a --regex option to discourse remap to use the regexp_replace
feature in PostgreSQL. Example usage:
discourse remap --regex "\[\/?color(=[^\]]*)*]" ""
removes all the "color" bbcodes.
Also, this commit fixes the --global option, which did not work because
of how Thor processes the options.
This adds a --regex option to discourse remap to use the regexp_replace
feature in PostgreSQL. Example usage:
discourse remap --regex "\[\/?color(=[^\]]*)*]" ""
removes all the "color" bbcodes.
Also, this commit fixes the --global option, which did not work because
of how Thor processes the options.
This adds a --regex option to discourse remap to use the regexp_replace
feature in PostgreSQL. Example usage:
discourse remap --regex "\[\/?color(=[^\]]*)*]" ""
removes all the "color" bbcodes.
Also, this commit fixes the --global option, which did not work because
of how Thor processes the options.
My discourse instance will be making regular automated public backups
of specific categories. It's preferred to be able to directly control
the path and filename of the output, rather than letting discourse
choose for me. This was already mostly supported, a filename parameter
just needed to be passed through the cli app.
- new hidden site setting 'migrate_to_new_scheme' (defaults to false)
- new rake tasks to toggle migration to new scheme
- FIX: migrate_to_new_scheme also works with CDN
- PERF: improve perf of the DbHelper.remap method
- REFACTOR: UrlHelper is now a class