Changes in dimension table column indexes generation.

- Indexes for dimension table columns are generated only if there
  are more than one non-PK columns.
pull/1/head
Abhinav Sarkar 7 years ago
parent 6ce2d56252
commit 089ce59f20
  1. 2
      src/Ringo/Generator/Create.hs

@ -48,7 +48,7 @@ dimensionTableDefnSQL table@Table {..} = do
tablePKColName = head [ cName | PrimaryKey cName <- tableConstraints ]
nonPKColNames = [ cName | Column cName _ _ <- tableColumns, cName /= tablePKColName ]
indexSQLs = [ "CREATE INDEX ON " <> tabName <> " (" <> cName <> ")"
| cName <- nonPKColNames ]
| cName <- nonPKColNames, length nonPKColNames > 1 ]
(++ indexSQLs) <$> tableDefnSQL table
factTableDefnSQL :: Fact -> Table -> Reader Env [Text]

Loading…
Cancel
Save