1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-02 02:36:24 -07:00

Update README with more info on gochan-migration and MariaDB/MySQL

Also update the TODO list
This commit is contained in:
Eggbertx 2023-04-07 15:04:41 -07:00
parent 17c28e5ebe
commit b132c54789
2 changed files with 13 additions and 16 deletions

View file

@ -21,21 +21,23 @@ See [`docker/README.md`](docker/README.md)
## Configuration ## Configuration
See [config.md](config.md) See [config.md](config.md)
<!-- ## Migration ## Migration
If you run gochan and get a message telling you your database is out of data, please run gochan-migration. If this does not work, please contact the developers. --> If you run gochan v3.0 or newer and get a message telling you that your database is out of date, please run gochan-migration -updatedb. If this does not work, please contact the developers.
## For developers (using Vagrant) ## For developers (using Vagrant)
1. Install Vagrant and Virtualbox. Vagrant lets you create a virtual machine and run a custom setup/installation script to make installation easier and faster. 1. Install Vagrant and Virtualbox. Vagrant lets you create a virtual machine and run a custom setup/installation script to make installation easier and faster.
2. From the command line, cd into vagrant/ and run `vagrant up`. By default, MySQL/MariaDB is used, but if you want to test with a different SQL type, run `GC_DBTYPE=dbtype vagrant up`, replacing "dbtype" with either mysql or postgresql 2. From the command line, cd into vagrant/ and run `vagrant up`. By default, MariaDB (a MySQL fork that most Linux distributions are defaulting to) is used, but if you want to test with a different SQL type, run `GC_DBTYPE=dbtype vagrant up`, replacing "dbtype" with either mysql or postgresql
- **Note on MySQL:** While MariaDB and mainline MySQL are very similar, there are a few features that MariaDB has that MySQL lacks that may cause issues. To specifically use the mainline MySQL server, run `GC_MYSQL_MAINLINE=1 vagrant up`
3. After it finishes installing the Ubuntu VM, follow the printed instructions. 3. After it finishes installing the Ubuntu VM, follow the printed instructions.
## For developers (using vscode) ## For developers (using vscode)
1. Install go, the vs-go extention and gcc (I think, let me know if you need something else) 1. Install go, the vs-go extention and gcc (I think, let me know if you need something else)
2. Install either postgreSQL or mariaDB. Setup a database with an account and enter the ip:post and login information into the gochan.json config. See "Configuration". (Tools like PG admin highly recommended for easy debugging of the database) 2. Install either postgreSQL or mariaDB. Setup a database with an account and enter the ip:post and login information into the gochan.json config. See "Configuration". (Tools like PG admin highly recommended for easy debugging of the database)
3. Set "DebugMode" to true. This will log all logs to the console and disable some checks. 3. Set "DebugMode" to true. This will log all logs to the console and disable some checks.
4. Open the folder containing everything in vscode (named gochan most likely), go to "Run" 4. Open the folder containing everything in vscode (named gochan most likely), go to "Run"
1. Select "gochan" if you wish to run/debug the website itself 1. Select "gochan" if you wish to run/debug the website itself
2. <s>Select "gochan-migrate" if you wish to run/debug the migrator</s> (gochan-migrate development has been put on indefinite hiatus) 2. Select "gochan-migrate" if you wish to run/debug the migration tool
5. (Optional) Change go extention configs. Examples: save all files on start debugging 5. (Optional) Change go extention configs. Examples: save all files on start debugging
6. Press F5 or "Start Debugging" to debug. 6. Press F5 or "Start Debugging" to debug.
@ -47,7 +49,7 @@ See [`frontend/README.md`](frontend/README.md) for information on working with S
## Style guide ## Style guide
* For Go source, follow the standard Go [style guide](https://github.com/golang/go/wiki/CodeReviewComments). * For Go source, follow the standard Go [style guide](https://github.com/golang/go/wiki/CodeReviewComments).
* variables and functions exposed to Go templates should be in camelCase, like Go variables * variables and functions exposed to Go templates should be in camelCase, like Go variables
* All exported functions and variables should have a documentation comment explaining their functionality, as per go style guides. * All exported functions and variables should have a documentation comment explaining their functionality, as per Go style guides.
* Unexported functions are preferred to have a documentation comment explaining it, unless it is sufficiently self explanatory or simple. * Unexported functions are preferred to have a documentation comment explaining it, unless it is sufficiently self explanatory or simple.
* Git commits should be descriptive. Put further explanation in the comment of the commit. * Git commits should be descriptive. Put further explanation in the comment of the commit.
* Function names should not be *too* long. * Function names should not be *too* long.
@ -56,19 +58,14 @@ See [`frontend/README.md`](frontend/README.md) for information on working with S
## Roadmap ## Roadmap
### Near future ### Near future
* Make the plugin support actually useful * Add some banners
* Improve moderation tools, using path routing instead of the action variable * Add config option to strip metadata from uploaded images
* Add support for sticky and locked threads * Add more plugin support (more event triggers)
* Add support for more filetypes (zip,) * Improve moderation tools
* Add support for more filetypes (zip, pdf, etc)
* Improve API support for existing chan browing phone apps * Improve API support for existing chan browing phone apps
### Lower priority ### Lower priority
* Better image fingerpringing and banning system (as opposed to a hash) * Better image fingerpringing and banning system (as opposed to a hash)
* Rework any legacy structs that uses comma separated fields to use a slice instead.
* RSS feeds from boards/specific threads/specific usernames+tripcodes (such as newsanon) * RSS feeds from boards/specific threads/specific usernames+tripcodes (such as newsanon)
* Pinning a post within a thread even if its not the OP, to prevent its deletion in a cyclical thread. * Pinning a post within a thread even if its not the OP, to prevent its deletion in a cyclical thread.
### Later down the line
### Possible experimental features:
* Allow users to be mini-moderators within threads they posted themselves, to prevent spammers/derailers.

View file

@ -24,7 +24,7 @@ var (
// but zero or more than one versions were found // but zero or more than one versions were found
ErrInvalidVersion = errors.New("database contains database_version table but zero or more than one versions were found") ErrInvalidVersion = errors.New("database contains database_version table but zero or more than one versions were found")
ErrCorruptedDB = errors.New("database contains gochan prefixed tables but is missing versioning tables (possibly corrupted)") ErrCorruptedDB = errors.New("database contains gochan prefixed tables but is missing versioning tables (possibly corrupted)")
ErrDeprecatedDB = errors.New("database layout is deprecated, please run gochan-migrate") ErrDeprecatedDB = errors.New("database layout is deprecated, please run gochan-migrate -updatedb")
ErrInvalidDBVersion = errors.New("invalid version flag returned by GetCompleteDatabaseVersion()") ErrInvalidDBVersion = errors.New("invalid version flag returned by GetCompleteDatabaseVersion()")
) )