diff options
author | vlad <vlad@drivergrp.com> | 2016-11-09 15:18:50 -0800 |
---|---|---|
committer | vlad <vlad@drivergrp.com> | 2016-11-09 15:18:50 -0800 |
commit | a6bd52df4ac75865528d9c87c7be15723879506c (patch) | |
tree | 39c2678711930e8dffacae65cf9331d23eefe0c0 | |
parent | e57e93f1c36adca193f682107c1b465c32253312 (diff) | |
download | driver-core-0.9.14.tar.gz driver-core-0.9.14.tar.bz2 driver-core-0.9.14.zip |
Rollback for Database standard table creation methodv0.9.14
-rw-r--r-- | project/plugins.sbt | 2 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/core/database.scala | 23 |
2 files changed, 12 insertions, 13 deletions
diff --git a/project/plugins.sbt b/project/plugins.sbt index 637ac2d..d0ea0fc 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ resolvers += "releases" at "https://drivergrp.jfrog.io/drivergrp/releases" credentials += Credentials("Artifactory Realm", "drivergrp.jfrog.io", "sbt-publisher", "ANC-d8X-Whm-USS") -addSbtPlugin("xyz.driver" % "sbt-settings" % "0.5.26") +addSbtPlugin("xyz.driver" % "sbt-settings" % "0.5.39") diff --git a/src/main/scala/xyz/driver/core/database.scala b/src/main/scala/xyz/driver/core/database.scala index 0ebcd0d..85a8cc4 100644 --- a/src/main/scala/xyz/driver/core/database.scala +++ b/src/main/scala/xyz/driver/core/database.scala @@ -5,8 +5,7 @@ import slick.dbio.{DBIOAction, NoStream} import slick.driver.JdbcProfile import xyz.driver.core.time.Time -import scala.concurrent.{ExecutionContext, Future} -import scala.language.reflectiveCalls +import scala.concurrent.Future object database { @@ -48,20 +47,20 @@ object database { trait DatabaseObject extends IdColumnTypes { - implicit val exec: ExecutionContext +// implicit val exec: ExecutionContext def createTables(): Future[Unit] def disconnect(): Unit - def ensureTableExist(schemas: Seq[Schema]): Future[Unit] = - for { - dropping <- Future.sequence(schemas.map { schema => - database.database.run(schema.drop).recover { case _: Throwable => () } - }) - creation <- Future.sequence(schemas.map { schema => - database.database.run(schema.create).recover { case _: Throwable => () } - }) - } yield () +// def ensureTableExist(schemas: Seq[Schema]): Future[Unit] = +// for { +// dropping <- Future.sequence(schemas.map { schema => +// database.database.run(schema.drop).recover { case _: Throwable => () } +// }) +// creation <- Future.sequence(schemas.map { schema => +// database.database.run(schema.create).recover { case _: Throwable => () } +// }) +// } yield () } abstract class DatabaseObjectAdapter extends DatabaseObject { |