Skip to content

Commit

Permalink
Remove origin, setup simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris7 committed Aug 1, 2024
1 parent a1eefa8 commit 05644a3
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 95 deletions.
4 changes: 1 addition & 3 deletions migrations/01-initial/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ CREATE UNIQUE INDEX block_uidx ON block(sequence_hash, block_group_id, start, en

CREATE TABLE edges (
id INTEGER PRIMARY KEY NOT NULL,
source_id INTEGER NOT NULL,
source_id INTEGER,
target_id INTEGER,
origin INTEGER NOT NULL,
chromosome_index INTEGER NOT NULL,
phased INTEGER NOT NULL,
FOREIGN KEY(source_id) REFERENCES block(id),
FOREIGN KEY(target_id) REFERENCES block(id),
constraint chk_phased check (phased in (0, 1))
constraint chk_origin check (origin in (0, 1))
);
CREATE UNIQUE INDEX edge_uidx ON edges(source_id, target_id, chromosome_index, phased);

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn import_fasta(fasta: &String, name: &String, shallow: bool, conn: &mut Connect
(sequence.len() as i32),
&"1".to_string(),
);
let edge = models::Edge::create(conn, block.id, None, 1, 0, 0);
let edge = models::Edge::create(conn, Some(block.id), None, 0, 0);
}
println!("Created it");
} else {
Expand Down
Loading

0 comments on commit 05644a3

Please sign in to comment.