Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Database schema creation script

The database in use is PostgresSQL 9.3+. This script creates the tables required for the crawler, ie:

  • users: table to store general users information.
  • repositories: table to store general repositories information.
  • gh_users: table to store information about GitHub users.
  • gh_repositories: table to store information about GitHub repositories.
  • gh_organizations: table to store information about GitHub organizations.

And 2 relation tables:

  • users_repositories: links users to the repositories they contributed to.
  • gh_users_organizations: links GitHub users to the GitHub organizations they belong to.

You need to create an empty PostgreSQL database, UTF8 encoded and then run:

psql -U user dbname < create_schema.sql