Add migration
This commit is contained in:
parent
59beb3a092
commit
61f53bbb7e
@ -2,10 +2,16 @@
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
setup_db() {
|
||||
set -eu
|
||||
|
||||
gitea migrate
|
||||
}
|
||||
|
||||
setup_root_user() {
|
||||
set -eu
|
||||
|
||||
user_count=$(sqlite3 /data/gitea.db "SELECT count(*) FROM user;")
|
||||
user_count=$(sqlite3 /data/gitea.db "SELECT count(*) FROM USER;")
|
||||
|
||||
if [[ "${user_count}" == "0" ]]; then
|
||||
echo "==> Setting up root user for first run"
|
||||
@ -22,6 +28,7 @@ setup_root_user() {
|
||||
main() {
|
||||
set -eu
|
||||
|
||||
setup_db
|
||||
setup_root_user
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user