Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • allgo allgo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 82
    • Issues 82
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • allgo
  • allgoallgo
  • Merge requests
  • !45

Merged
Created Jun 19, 2018 by BAIRE Anthony@abaireOwner

refactor django db init

  • Overview 0
  • Commits 4
  • Changes 27

This PR removes all the existing migrations from allgo/main/migrations (which were not up-to-date) and generate them on-the-fly instead.

  • .gitignore is configured to ignore all migrations scrips
  • container_init calls makemigrations before creating the db This is a temporary measure until we go to production. Before the first production deployment we will have to revert babd35f4 and run makemigrations to generate the initial migration.

Also with this PR, the django db is no longer initialised from the rails db (the migrate.sh is no longer called at container init). The db is created from scratch instead and seeded with default values (python3 manage.py db_seed).

The db_seed command creates default values (required for allgo to work):

  • initial docker OS list (debian, centos, fedora, ubuntu)
  • default job queue (named 'default')
  • the 'inria' Group (seems to be hardcoded in the sources)

Additionally, in development mode, it creates (and enables) 3 user accounts (all with the 'allgo' password):

  • admin@localhost which is superuser
  • devel@localhost which own a webapp named 'sleep'
  • guest@localhost
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: local-migrations