
from carepoint import Carepoint
from sqlalchemy import (Column,
                        Integer,
                        String,
                        Boolean,
                        )


class FdbGcnSeq(Carepoint.BASE):
    __tablename__ = 'fdrgcnseq'
    __dbname__ = 'cph'

    gcn_seqno = Column(Integer, primary_key=True)
    hic3 = Column(String)
    hicl_seqno = Column(Integer)
    gcdf = Column(String)
    gcrt = Column(String)
    str = Column(String)
    gtc = Column(Integer)
    tc = Column(Integer)
    dcc = Column(Integer)
    gcnseq_gi = Column(Integer)
    gender = Column(Integer)
    hic3_seqn = Column(Integer)
    str60 = Column(String)
    update_yn = Column(Boolean)


from carepoint import Carepoint
from sqlalchemy import (Column,
                        Integer,
                        String,
                        Boolean,
                        ForeignKey,
                        )


class FdbGcnSeq(Carepoint.BASE):
    __tablename__ = 'fdrgcnseq'
    __dbname__ = 'cph'

    gcn_seqno = Column(Integer, primary_key=True)
    hic3 = Column(String)
    hicl_seqno = Column(Integer)
    gcdf = Column(
        String,
        ForeignKey('fdrdosed.gcdf'),
    )
    gcrt = Column(
        String,
        ForeignKey('fdrrouted.gcrt'),
    )
    str = Column(String)
    gtc = Column(Integer)
    tc = Column(Integer)
    dcc = Column(Integer)
    gcnseq_gi = Column(Integer)
    gender = Column(Integer)
    hic3_seqn = Column(Integer)
    str60 = Column(String)
    update_yn = Column(Boolean)

Add foreign keys for form and route in Fdb Gcn Seq in carepoint cph
Add foreign keys for form and route in Fdb Gcn Seq in carepoint cph

  
  from carepoint import Carepoint
  from sqlalchemy import (Column,
                          Integer,
                          String,
                          Boolean,
+                         ForeignKey,
                          )
  
  
  class FdbGcnSeq(Carepoint.BASE):
      __tablename__ = 'fdrgcnseq'
      __dbname__ = 'cph'
  
      gcn_seqno = Column(Integer, primary_key=True)
      hic3 = Column(String)
      hicl_seqno = Column(Integer)
-     gcdf = Column(String)
+     gcdf = Column(
+         String,
+         ForeignKey('fdrdosed.gcdf'),
+     )
-     gcrt = Column(String)
+     gcrt = Column(
+         String,
+         ForeignKey('fdrrouted.gcrt'),
+     )
      str = Column(String)
      gtc = Column(Integer)
      tc = Column(Integer)
      dcc = Column(Integer)
      gcnseq_gi = Column(Integer)
      gender = Column(Integer)
      hic3_seqn = Column(Integer)
      str60 = Column(String)
      update_yn = Column(Boolean)
  
Add foreign keys for form and route in Fdb Gcn Seq in carepoint cph
## Code Before:

from carepoint import Carepoint
from sqlalchemy import (Column,
                        Integer,
                        String,
                        Boolean,
                        )


class FdbGcnSeq(Carepoint.BASE):
    __tablename__ = 'fdrgcnseq'
    __dbname__ = 'cph'

    gcn_seqno = Column(Integer, primary_key=True)
    hic3 = Column(String)
    hicl_seqno = Column(Integer)
    gcdf = Column(String)
    gcrt = Column(String)
    str = Column(String)
    gtc = Column(Integer)
    tc = Column(Integer)
    dcc = Column(Integer)
    gcnseq_gi = Column(Integer)
    gender = Column(Integer)
    hic3_seqn = Column(Integer)
    str60 = Column(String)
    update_yn = Column(Boolean)

## Instruction:
Add foreign keys for form and route in Fdb Gcn Seq in carepoint cph
## Code After:

from carepoint import Carepoint
from sqlalchemy import (Column,
                        Integer,
                        String,
                        Boolean,
                        ForeignKey,
                        )


class FdbGcnSeq(Carepoint.BASE):
    __tablename__ = 'fdrgcnseq'
    __dbname__ = 'cph'

    gcn_seqno = Column(Integer, primary_key=True)
    hic3 = Column(String)
    hicl_seqno = Column(Integer)
    gcdf = Column(
        String,
        ForeignKey('fdrdosed.gcdf'),
    )
    gcrt = Column(
        String,
        ForeignKey('fdrrouted.gcrt'),
    )
    str = Column(String)
    gtc = Column(Integer)
    tc = Column(Integer)
    dcc = Column(Integer)
    gcnseq_gi = Column(Integer)
    gender = Column(Integer)
    hic3_seqn = Column(Integer)
    str60 = Column(String)
    update_yn = Column(Boolean)
