Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • 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
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 81
    • Issues 81
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • allgoallgo
  • allgoallgo
  • Merge requests
  • !45

refactor django db init

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged BAIRE Anthony requested to merge local-migrations into django Jun 19, 2018
  • Overview 0
  • Commits 4
  • Pipelines 0
  • 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
Reviewers
Request review from
Time tracking
Source branch: local-migrations