refactor: remove colFK from Column
This commit is contained in:
committed by
Steve Chavez
parent
6670a3214b
commit
0f6a13191c
@@ -3,7 +3,6 @@
|
||||
|
||||
module PostgREST.DbStructure.Relationship
|
||||
( Cardinality(..)
|
||||
, ForeignKey(..)
|
||||
, PrimaryKey(..)
|
||||
, Relationship(..)
|
||||
, Junction(..)
|
||||
@@ -12,8 +11,7 @@ module PostgREST.DbStructure.Relationship
|
||||
|
||||
import qualified Data.Aeson as JSON
|
||||
|
||||
import PostgREST.DbStructure.Table (Column (..), ForeignKey (..),
|
||||
Table (..))
|
||||
import PostgREST.DbStructure.Table (Column (..), Table (..))
|
||||
|
||||
import Protolude
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
module PostgREST.DbStructure.Table
|
||||
( Column(..)
|
||||
, ForeignKey(..)
|
||||
, Table(..)
|
||||
, tableQi
|
||||
) where
|
||||
@@ -34,10 +33,6 @@ instance Eq Table where
|
||||
tableQi :: Table -> QualifiedIdentifier
|
||||
tableQi Table{tableSchema=s, tableName=n} = QualifiedIdentifier s n
|
||||
|
||||
newtype ForeignKey = ForeignKey
|
||||
{ fkCol :: Column }
|
||||
deriving (Eq, Ord, Generic, JSON.ToJSON)
|
||||
|
||||
data Column = Column
|
||||
{ colTable :: Table
|
||||
, colName :: FieldName
|
||||
@@ -47,7 +42,6 @@ data Column = Column
|
||||
, colMaxLen :: Maybe Int32
|
||||
, colDefault :: Maybe Text
|
||||
, colEnum :: [Text]
|
||||
, colFK :: Maybe ForeignKey
|
||||
}
|
||||
deriving (Ord, Generic, JSON.ToJSON)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user