• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaMathias / college_tracker / e4476579b882cf21e8d36d0640c7ffeb88875b8d
91%

Build:
DEFAULT BRANCH: main
Ran 16 Jun 2023 10:20PM UTC
Jobs 1
Files 31
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jun 2023 10:17PM UTC coverage: 90.39% (+66.5%) from 23.889%
e4476579b882cf21e8d36d0640c7ffeb88875b8d

push

github

web-flow
models (#12)

# Purpose

This PR introduces three new Elixir/Ecto models: `ActivityCategory`,
`ActivityType`, and `Activity`. The purpose is to allow our application to
manage extracurricular activities for a college student. These models will enable 
us to categorize activities, set different types of activities under each category,
and create individual activities related to specific types.

## Approach

The problem is addressed by using Ecto schemas in Elixir to create corresponding
models for `ActivityCategory`, `ActivityType`, and `Activity`. We define
necessary fields for each schema and the relationships between them.
`ActivityCategory` and `ActivityType` are related through a one-to-many
association, while `ActivityType` and `Activity` are also related via a
one-to-many association.

## Database migrations

This PR introduces database migrations that create tables for each model with
the necessary fields and constraints.

- [x] I have confirmed that the Ecto Schema and database migrations have
  equivalent restrictions.
  - [x] default values are the same: `status` fields in `ActivityType` and
    `Activity` models both have default values in the schema and migration.
  - [x] whether null/nil values restrictions are the same: the required fields
    in the schema are enforced to be not null in the migrations.

- [ ] Where necessary, I have added tests of the migration as documented
  [here](https://docs.turn.systems/testing_guideline.html#testing-database-migrations)
  - [ ] N/A, as no complex operations are performed in the migrations, testing
    of the migrations is not necessary.

- [x] I have checked whether any of the migrations will need to be run manually
  - [x] No manual migrations are needed.
  - [x] N/A, no raw SQL is included within the migration file.

## Commits

- create activity category
- create activity type
- add `total_limit`, `remaining_limit` and `status` to `ActivityCategory`
-... (continued)

199 of 205 new or added lines in 15 files covered. (97.07%)

348 of 385 relevant lines covered (90.39%)

21.65 hits per line

Jobs
ID Job ID Ran Files Coverage
1 e4476579b882cf21e8d36d0640c7ffeb88875b8d.1 16 Jun 2023 10:20PM UTC 0
90.39
GitHub Action Run
Source Files on build e4476579b882cf21e8d36d0640c7ffeb88875b8d
Detailed source file information is not available for this build.
  • Back to Repo
  • e4476579 on github
  • Prev Build on main (#DFDB2BD1...)
  • Next Build on main (#ACBA5126...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc