Skip to content

Commit

Permalink
Merge pull request #76 from Jim-Hodapp-Coaching/update_seeded_data
Browse files Browse the repository at this point in the history
Update seeded data
  • Loading branch information
jhodapp authored Oct 31, 2024
2 parents 8c0f394 + 3a94cb2 commit e1c8a77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions entity_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ pub async fn seed_database(db: &DatabaseConnection) {
.await
.unwrap();

let jim_hodapp_coaching = organizations::ActiveModel {
name: Set("Jim Hodapp's Coaching".to_owned()),
let refactor_coaching = organizations::ActiveModel {
name: Set("Refactor Coaching".to_owned()),
created_at: Set(now.into()),
updated_at: Set(now.into()),
..Default::default()
Expand All @@ -89,8 +89,8 @@ pub async fn seed_database(db: &DatabaseConnection) {
.await
.unwrap();

let jim_hodapp_other_org = organizations::ActiveModel {
name: Set("Jim Hodapp's Other Organization".to_owned()),
let acme_corp = organizations::ActiveModel {
name: Set("Acme Corp".to_owned()),
created_at: Set(now.into()),
updated_at: Set(now.into()),
..Default::default()
Expand All @@ -102,7 +102,7 @@ pub async fn seed_database(db: &DatabaseConnection) {
let jim_caleb_coaching_relationship = coaching_relationships::ActiveModel {
coach_id: Set(jim_hodapp.id.clone().unwrap()),
coachee_id: Set(caleb_bourg.id.clone().unwrap()),
organization_id: Set(jim_hodapp_coaching.id.unwrap()),
organization_id: Set(refactor_coaching.id.unwrap()),
created_at: Set(now.into()),
updated_at: Set(now.into()),
..Default::default()
Expand All @@ -114,7 +114,7 @@ pub async fn seed_database(db: &DatabaseConnection) {
coaching_relationships::ActiveModel {
coach_id: Set(jim_hodapp.id.clone().unwrap()),
coachee_id: Set(other_user.id.clone().unwrap()),
organization_id: Set(jim_hodapp_other_org.id.unwrap()),
organization_id: Set(acme_corp.id.unwrap()),
created_at: Set(now.into()),
updated_at: Set(now.into()),
..Default::default()
Expand Down Expand Up @@ -173,7 +173,7 @@ pub async fn seed_database(db: &DatabaseConnection) {

coaching_sessions::ActiveModel {
coaching_relationship_id: Set(jim_caleb_coaching_relationship.id.clone().unwrap()),
date: Set(now.naive_local().checked_sub_days(Days::new(28)).unwrap()),
date: Set(now.naive_local().checked_add_days(Days::new(28)).unwrap()),
timezone: Set("America/Chicago".to_owned()),
created_at: Set(now.into()),
updated_at: Set(now.into()),
Expand Down
4 changes: 2 additions & 2 deletions migration/src/refactor_platform_rs.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- SQL dump generated using DBML (dbml.dbdiagram.io)
-- SQL dump generated using DBML (dbml-lang.org)
-- Database: PostgreSQL
-- Generated at: 2024-10-10T11:19:54.853Z
-- Generated at: 2024-10-31T16:04:10.825Z


CREATE TYPE "status" AS ENUM (
Expand Down

0 comments on commit e1c8a77

Please sign in to comment.