Skip to content

Commit

Permalink
fix part inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Mar 27, 2017
1 parent 3bea7ba commit e2bf037
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions ordinary_data/nodes/od_part.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ CREATE TABLE qwat_od.part ();
COMMENT ON TABLE qwat_od.part IS 'Table for installation parts. Inherits from node.';

/* COLUMNS */
ALTER TABLE qwat_od.part ADD COLUMN id integer NOT NULL REFERENCES qwat_od.part(id) PRIMARY KEY;
ALTER TABLE qwat_od.part ADD COLUMN id integer NOT NULL REFERENCES qwat_od.network_element(id) PRIMARY KEY;
ALTER TABLE qwat_od.part ADD COLUMN fk_part_type integer not null ;
ALTER TABLE qwat_od.part ADD COLUMN fk_pipe integer;

/* CONSTRAINTS */
ALTER TABLE qwat_od.part ADD CONSTRAINT part_fk_type FOREIGN KEY (fk_part_type) REFERENCES qwat_vl.part_type(id) MATCH FULL; CREATE INDEX fki_part_fk_type ON qwat_od.part(fk_part_type) ;
ALTER TABLE qwat_od.part ADD CONSTRAINT part_fk_pipe FOREIGN KEY (fk_pipe) REFERENCES qwat_od.pipe(id) MATCH FULL; CREATE INDEX fki_part_fk_pipe ON qwat_od.part(fk_pipe) ;


5 changes: 5 additions & 0 deletions update/delta/delta_1.2.5_fix_part_inheritance.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ALTER TABLE qwat_od.part
DROP CONSTRAINT part_id_fkey,
ADD CONSTRAINT part_id_fkey FOREIGN KEY (id) REFERENCES qwat_od.network_element (id) MATCH SIMPLE;

UPDATE qwat_sys.versions SET version = '1.2.5';

7 comments on commit e2bf037

@3nids
Copy link
Member Author

@3nids 3nids commented on e2bf037 Mar 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sylvainbeo PR was green. Since then @haubourg released an older version (1.2.2) without title. I fixed the title but it's still failing. Do you have an explanation?

@haubourg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@3nids not sure I get the title problem, what is missing exactly?
Like you, I don't get why just pushing a tag now fails the PR.

@3nids
Copy link
Member Author

@3nids 3nids commented on e2bf037 Mar 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not the PR but the test on the last commit in the master branch

@sylvainbeo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think i do. In the verify_upgrade_db.sh i read the latest tag version by doing :

LATEST_TAG=$(git describe)
SHORT_LATEST_TAG=$(echo $LATEST_TAG| cut -c 1)

But i think, it's wrong, i'm on it.

@sylvainbeo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@3nids Mmm in fact, not sure it's the same problem.

@sylvainbeo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@3nids @haubourg The tag number should be 1.2.2 not v1.2.2

@sylvainbeo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fixed.

Please sign in to comment.