sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kal...@apache.org
Subject [2/2] sentry git commit: SENTRY-1828 Rename version in sentry-ha-redesign branch to 2.0.0-SNAPSHOT(kalyan kumar kalvagadda, Reviewed by Na Li, Alexander Kolbasov)
Date Mon, 10 Jul 2017 22:46:09 GMT
SENTRY-1828 Rename version in sentry-ha-redesign branch to 2.0.0-SNAPSHOT(kalyan kumar kalvagadda, Reviewed by Na Li, Alexander Kolbasov)


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/c8d0f24a
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/c8d0f24a
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/c8d0f24a

Branch: refs/heads/sentry-ha-redesign
Commit: c8d0f24a23186eac015292214d025ac7d9e9e415
Parents: 1b3535e
Author: Kalyan Kumar Kalvagadda <kkalyan@cloudera.com>
Authored: Mon Jul 10 17:46:53 2017 -0500
Committer: Kalyan Kumar Kalvagadda <kkalyan@cloudera.com>
Committed: Mon Jul 10 17:46:53 2017 -0500

----------------------------------------------------------------------
 pom.xml                                         |   2 +-
 sentry-binding/pom.xml                          |   2 +-
 .../sentry-binding-hive-common/pom.xml          |   4 +-
 sentry-binding/sentry-binding-hive-conf/pom.xml |   2 +-
 .../sentry-binding-hive-follower/pom.xml        |   2 +-
 sentry-binding/sentry-binding-hive-v2/pom.xml   |   2 +-
 sentry-binding/sentry-binding-hive/pom.xml      |   2 +-
 sentry-binding/sentry-binding-kafka/pom.xml     |   2 +-
 sentry-binding/sentry-binding-solr/pom.xml      |   2 +-
 sentry-binding/sentry-binding-sqoop/pom.xml     |   2 +-
 sentry-core/pom.xml                             |   2 +-
 sentry-core/sentry-core-common/pom.xml          |   2 +-
 sentry-core/sentry-core-model-db/pom.xml        |   2 +-
 sentry-core/sentry-core-model-indexer/pom.xml   |   2 +-
 sentry-core/sentry-core-model-kafka/pom.xml     |   2 +-
 sentry-core/sentry-core-model-search/pom.xml    |   2 +-
 sentry-core/sentry-core-model-sqoop/pom.xml     |   2 +-
 sentry-dist/pom.xml                             |   2 +-
 sentry-hdfs/pom.xml                             |   2 +-
 sentry-hdfs/sentry-hdfs-common/pom.xml          |   2 +-
 sentry-hdfs/sentry-hdfs-dist/pom.xml            |   2 +-
 sentry-hdfs/sentry-hdfs-namenode-plugin/pom.xml |   4 +-
 sentry-hdfs/sentry-hdfs-service/pom.xml         |   2 +-
 sentry-policy/pom.xml                           |   2 +-
 sentry-policy/sentry-policy-common/pom.xml      |   2 +-
 sentry-policy/sentry-policy-engine/pom.xml      |   2 +-
 sentry-policy/sentry-policy-indexer/pom.xml     |   2 +-
 sentry-provider/pom.xml                         |   2 +-
 sentry-provider/sentry-provider-cache/pom.xml   |   2 +-
 sentry-provider/sentry-provider-common/pom.xml  |   2 +-
 sentry-provider/sentry-provider-db/pom.xml      |  10 +-
 .../persistent/SentryStoreSchemaInfo.java       |   2 +-
 .../src/main/resources/sentry-db2-1.8.0.sql     | 253 ----------------
 .../src/main/resources/sentry-db2-2.0.0.sql     | 253 ++++++++++++++++
 .../src/main/resources/sentry-derby-1.8.0.sql   | 254 ----------------
 .../src/main/resources/sentry-derby-2.0.0.sql   | 254 ++++++++++++++++
 .../src/main/resources/sentry-mysql-1.8.0.sql   | 286 -------------------
 .../src/main/resources/sentry-mysql-2.0.0.sql   | 286 +++++++++++++++++++
 .../src/main/resources/sentry-oracle-1.8.0.sql  | 269 -----------------
 .../src/main/resources/sentry-oracle-2.0.0.sql  | 269 +++++++++++++++++
 .../main/resources/sentry-postgres-1.8.0.sql    | 276 ------------------
 .../main/resources/sentry-postgres-2.0.0.sql    | 276 ++++++++++++++++++
 .../sentry-upgrade-db2-1.7.0-to-1.8.0.sql       | 103 -------
 .../sentry-upgrade-db2-1.7.0-to-2.0.0.sql       | 103 +++++++
 .../sentry-upgrade-derby-1.7.0-to-1.8.0.sql     |   7 -
 .../sentry-upgrade-derby-1.7.0-to-2.0.0.sql     |   7 +
 .../sentry-upgrade-mysql-1.7.0-to-1.8.0.sql     |   9 -
 .../sentry-upgrade-mysql-1.7.0-to-2.0.0.sql     |   9 +
 .../sentry-upgrade-oracle-1.7.0-to-1.8.0.sql    |   9 -
 .../sentry-upgrade-oracle-1.7.0-to-2.0.0.sql    |   9 +
 .../sentry-upgrade-postgres-1.7.0-to-1.8.0.sql  |   9 -
 .../sentry-upgrade-postgres-1.7.0-to-2.0.0.sql  |   9 +
 .../src/main/resources/upgrade.order.db2        |   2 +-
 .../src/main/resources/upgrade.order.derby      |   2 +-
 .../src/main/resources/upgrade.order.mysql      |   2 +-
 .../src/main/resources/upgrade.order.oracle     |   2 +-
 .../src/main/resources/upgrade.order.postgres   |   2 +-
 .../src/main/webapp/SentryService.html          |   2 +-
 sentry-provider/sentry-provider-file/pom.xml    |   2 +-
 sentry-solr/pom.xml                             |   2 +-
 sentry-solr/solr-sentry-core/pom.xml            |   2 +-
 sentry-solr/solr-sentry-handlers/pom.xml        |   2 +-
 sentry-tests/pom.xml                            |   2 +-
 sentry-tests/sentry-tests-hive-v2/pom.xml       |   2 +-
 sentry-tests/sentry-tests-hive/pom.xml          |   2 +-
 sentry-tests/sentry-tests-kafka/pom.xml         |   2 +-
 sentry-tests/sentry-tests-solr/pom.xml          |   2 +-
 sentry-tests/sentry-tests-sqoop/pom.xml         |   2 +-
 68 files changed, 1529 insertions(+), 1529 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 24ab448..2c109a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@ limitations under the License.
 
   <groupId>org.apache.sentry</groupId>
   <artifactId>sentry</artifactId>
-  <version>1.8.0-SNAPSHOT</version>
+  <version>2.0.0-SNAPSHOT</version>
   <description>Sentry component</description>
   <name>Sentry</name>
   <packaging>pom</packaging>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/pom.xml b/sentry-binding/pom.xml
index 48ae245..71fe47c 100644
--- a/sentry-binding/pom.xml
+++ b/sentry-binding/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/sentry-binding-hive-common/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive-common/pom.xml b/sentry-binding/sentry-binding-hive-common/pom.xml
index d38a494..0cdb739 100644
--- a/sentry-binding/sentry-binding-hive-common/pom.xml
+++ b/sentry-binding/sentry-binding-hive-common/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-binding</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding-hive-common</artifactId>
@@ -80,7 +80,7 @@ limitations under the License.
     <dependency>
       <groupId>org.apache.sentry</groupId>
       <artifactId>sentry-binding-hive-conf</artifactId>
-      <version>1.8.0-SNAPSHOT</version>
+      <version>2.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/sentry-binding-hive-conf/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive-conf/pom.xml b/sentry-binding/sentry-binding-hive-conf/pom.xml
index 2cae541..8539f5b 100644
--- a/sentry-binding/sentry-binding-hive-conf/pom.xml
+++ b/sentry-binding/sentry-binding-hive-conf/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-binding</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding-hive-conf</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/sentry-binding-hive-follower/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive-follower/pom.xml b/sentry-binding/sentry-binding-hive-follower/pom.xml
index bcfb417..f9f57ad 100644
--- a/sentry-binding/sentry-binding-hive-follower/pom.xml
+++ b/sentry-binding/sentry-binding-hive-follower/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-binding</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding-hive-follower</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/sentry-binding-hive-v2/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive-v2/pom.xml b/sentry-binding/sentry-binding-hive-v2/pom.xml
index cb1b026..eafc0ad 100644
--- a/sentry-binding/sentry-binding-hive-v2/pom.xml
+++ b/sentry-binding/sentry-binding-hive-v2/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-binding</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding-hive-v2</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/sentry-binding-hive/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive/pom.xml b/sentry-binding/sentry-binding-hive/pom.xml
index ca87836..f7a889a 100644
--- a/sentry-binding/sentry-binding-hive/pom.xml
+++ b/sentry-binding/sentry-binding-hive/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-binding</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding-hive</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/sentry-binding-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-kafka/pom.xml b/sentry-binding/sentry-binding-kafka/pom.xml
index f6f212b..aff3b50 100644
--- a/sentry-binding/sentry-binding-kafka/pom.xml
+++ b/sentry-binding/sentry-binding-kafka/pom.xml
@@ -23,7 +23,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-binding</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding-kafka</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/sentry-binding-solr/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-solr/pom.xml b/sentry-binding/sentry-binding-solr/pom.xml
index 2bbb2ce..9cb8d27 100644
--- a/sentry-binding/sentry-binding-solr/pom.xml
+++ b/sentry-binding/sentry-binding-solr/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-binding</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding-solr</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-binding/sentry-binding-sqoop/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-sqoop/pom.xml b/sentry-binding/sentry-binding-sqoop/pom.xml
index 732da26..3a652bc 100644
--- a/sentry-binding/sentry-binding-sqoop/pom.xml
+++ b/sentry-binding/sentry-binding-sqoop/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-binding</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-binding-sqoop</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-core/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-core/pom.xml b/sentry-core/pom.xml
index 1ab4c7f..6b91767 100644
--- a/sentry-core/pom.xml
+++ b/sentry-core/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-core</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-core/sentry-core-common/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-core/sentry-core-common/pom.xml b/sentry-core/sentry-core-common/pom.xml
index 2e7f5c5..be43de2 100644
--- a/sentry-core/sentry-core-common/pom.xml
+++ b/sentry-core/sentry-core-common/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-core</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-core-common</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-core/sentry-core-model-db/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-core/sentry-core-model-db/pom.xml b/sentry-core/sentry-core-model-db/pom.xml
index d209fe7..b7a2b68 100644
--- a/sentry-core/sentry-core-model-db/pom.xml
+++ b/sentry-core/sentry-core-model-db/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-core</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-core-model-db</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-core/sentry-core-model-indexer/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-core/sentry-core-model-indexer/pom.xml b/sentry-core/sentry-core-model-indexer/pom.xml
index 8d1cbc2..080e2d0 100644
--- a/sentry-core/sentry-core-model-indexer/pom.xml
+++ b/sentry-core/sentry-core-model-indexer/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-core</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-core-model-indexer</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-core/sentry-core-model-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-core/sentry-core-model-kafka/pom.xml b/sentry-core/sentry-core-model-kafka/pom.xml
index d32c630..9ae7010 100644
--- a/sentry-core/sentry-core-model-kafka/pom.xml
+++ b/sentry-core/sentry-core-model-kafka/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-core</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-core-model-kafka</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-core/sentry-core-model-search/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-core/sentry-core-model-search/pom.xml b/sentry-core/sentry-core-model-search/pom.xml
index db73f62..5917a63 100644
--- a/sentry-core/sentry-core-model-search/pom.xml
+++ b/sentry-core/sentry-core-model-search/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-core</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-core-model-search</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-core/sentry-core-model-sqoop/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-core/sentry-core-model-sqoop/pom.xml b/sentry-core/sentry-core-model-sqoop/pom.xml
index f3a1a2f..0d94e9a 100644
--- a/sentry-core/sentry-core-model-sqoop/pom.xml
+++ b/sentry-core/sentry-core-model-sqoop/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-core</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-core-model-sqoop</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-dist/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-dist/pom.xml b/sentry-dist/pom.xml
index 5952b87..2d7f57e 100644
--- a/sentry-dist/pom.xml
+++ b/sentry-dist/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>sentry-dist</artifactId>
   <name>Sentry Distribution</name>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-hdfs/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-hdfs/pom.xml b/sentry-hdfs/pom.xml
index be1fa6c..43ada51 100644
--- a/sentry-hdfs/pom.xml
+++ b/sentry-hdfs/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-hdfs</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-hdfs/sentry-hdfs-common/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-hdfs/sentry-hdfs-common/pom.xml b/sentry-hdfs/sentry-hdfs-common/pom.xml
index 7e607e5..96f5f81 100644
--- a/sentry-hdfs/sentry-hdfs-common/pom.xml
+++ b/sentry-hdfs/sentry-hdfs-common/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-hdfs</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-hdfs-common</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-hdfs/sentry-hdfs-dist/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-hdfs/sentry-hdfs-dist/pom.xml b/sentry-hdfs/sentry-hdfs-dist/pom.xml
index cedcb0f..4674fc0 100644
--- a/sentry-hdfs/sentry-hdfs-dist/pom.xml
+++ b/sentry-hdfs/sentry-hdfs-dist/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-hdfs</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-hdfs-dist</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-hdfs/sentry-hdfs-namenode-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-hdfs/sentry-hdfs-namenode-plugin/pom.xml b/sentry-hdfs/sentry-hdfs-namenode-plugin/pom.xml
index 25ae34b..8d2df79 100644
--- a/sentry-hdfs/sentry-hdfs-namenode-plugin/pom.xml
+++ b/sentry-hdfs/sentry-hdfs-namenode-plugin/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-hdfs</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-hdfs-namenode-plugin</artifactId>
@@ -32,7 +32,7 @@ limitations under the License.
     <dependency>
       <groupId>org.apache.sentry</groupId>
       <artifactId>sentry-hdfs-common</artifactId>
-      <version>1.8.0-SNAPSHOT</version>
+      <version>2.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.sentry</groupId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-hdfs/sentry-hdfs-service/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-hdfs/sentry-hdfs-service/pom.xml b/sentry-hdfs/sentry-hdfs-service/pom.xml
index 4d8c76d..6df086c 100644
--- a/sentry-hdfs/sentry-hdfs-service/pom.xml
+++ b/sentry-hdfs/sentry-hdfs-service/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-hdfs</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-hdfs-service</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-policy/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-policy/pom.xml b/sentry-policy/pom.xml
index 14fe829..e7eb97a 100644
--- a/sentry-policy/pom.xml
+++ b/sentry-policy/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-policy</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-policy/sentry-policy-common/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-policy/sentry-policy-common/pom.xml b/sentry-policy/sentry-policy-common/pom.xml
index 57fc9d9..047cd3e 100644
--- a/sentry-policy/sentry-policy-common/pom.xml
+++ b/sentry-policy/sentry-policy-common/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-policy</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-policy-common</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-policy/sentry-policy-engine/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-policy/sentry-policy-engine/pom.xml b/sentry-policy/sentry-policy-engine/pom.xml
index e9c44d7..73ecdce 100644
--- a/sentry-policy/sentry-policy-engine/pom.xml
+++ b/sentry-policy/sentry-policy-engine/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
     <parent>
         <groupId>org.apache.sentry</groupId>
         <artifactId>sentry-policy</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>2.0.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>sentry-policy-engine</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-policy/sentry-policy-indexer/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-policy/sentry-policy-indexer/pom.xml b/sentry-policy/sentry-policy-indexer/pom.xml
index e6ef72f..aee1608 100644
--- a/sentry-policy/sentry-policy-indexer/pom.xml
+++ b/sentry-policy/sentry-policy-indexer/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-policy</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-policy-indexer</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-provider/pom.xml b/sentry-provider/pom.xml
index a929b00..a4910bd 100644
--- a/sentry-provider/pom.xml
+++ b/sentry-provider/pom.xml
@@ -22,7 +22,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-provider</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-cache/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-cache/pom.xml b/sentry-provider/sentry-provider-cache/pom.xml
index ec77003..b4969bc 100644
--- a/sentry-provider/sentry-provider-cache/pom.xml
+++ b/sentry-provider/sentry-provider-cache/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-provider</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-provider-cache</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-common/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-common/pom.xml b/sentry-provider/sentry-provider-common/pom.xml
index 9af153a..9c568e8 100644
--- a/sentry-provider/sentry-provider-common/pom.xml
+++ b/sentry-provider/sentry-provider-common/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-provider</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-provider-common</artifactId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-db/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/pom.xml b/sentry-provider/sentry-provider-db/pom.xml
index 10dae4a..12f50f9 100644
--- a/sentry-provider/sentry-provider-db/pom.xml
+++ b/sentry-provider/sentry-provider-db/pom.xml
@@ -21,7 +21,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.sentry</groupId>
     <artifactId>sentry-provider</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>sentry-provider-db</artifactId>
@@ -113,12 +113,12 @@ limitations under the License.
     <dependency>
       <groupId>org.apache.sentry</groupId>
       <artifactId>sentry-binding-hive-conf</artifactId>
-      <version>1.8.0-SNAPSHOT</version>
+      <version>2.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.sentry</groupId>
       <artifactId>sentry-binding-hive-follower</artifactId>
-      <version>1.8.0-SNAPSHOT</version>
+      <version>2.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.sentry</groupId>
@@ -127,12 +127,12 @@ limitations under the License.
     <dependency>
       <groupId>org.apache.sentry</groupId>
       <artifactId>sentry-binding-hive-conf</artifactId>
-      <version>1.8.0-SNAPSHOT</version>
+      <version>2.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.sentry</groupId>
       <artifactId>sentry-binding-hive-follower</artifactId>
-      <version>1.8.0-SNAPSHOT</version>
+      <version>2.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.hive</groupId>

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java
index 223cc87..f1a5b10 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java
@@ -37,7 +37,7 @@ public class SentryStoreSchemaInfo {
   private final String sentrySchemaVersions[];
   private final String sentryScriptDir;
 
-  private static final String SENTRY_VERSION = "1.8.0";
+  private static final String SENTRY_VERSION = "2.0.0";
 
   public SentryStoreSchemaInfo(String sentryScriptDir, String dbType)
       throws SentryUserException {

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql b/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql
deleted file mode 100644
index 7ade0a4..0000000
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql
+++ /dev/null
@@ -1,253 +0,0 @@
---Licensed to the Apache Software Foundation (ASF) under one or more
---contributor license agreements.  See the NOTICE file distributed with
---this work for additional information regarding copyright ownership.
---The ASF licenses this file to You under the Apache License, Version 2.0
---(the "License"); you may not use this file except in compliance with
---the License.  You may obtain a copy of the License at
---
---    http://www.apache.org/licenses/LICENSE-2.0
---
---Unless required by applicable law or agreed to in writing, software
---distributed under the License is distributed on an "AS IS" BASIS,
---WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
---See the License for the specific language governing permissions and
---limitations under the License.
-
--- Table SENTRY_DB_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryPrivilege]
-CREATE TABLE SENTRY_DB_PRIVILEGE
-(
-    DB_PRIVILEGE_ID BIGINT NOT NULL generated always as identity (start with 1),
-    URI VARCHAR(4000),
-    "ACTION" VARCHAR(40),
-    CREATE_TIME BIGINT NOT NULL,
-    DB_NAME VARCHAR(4000),
-    PRIVILEGE_SCOPE VARCHAR(40),
-    "SERVER_NAME" VARCHAR(4000),
-    "TABLE_NAME" VARCHAR(4000),
-    "COLUMN_NAME" VARCHAR(4000),
-    WITH_GRANT_OPTION CHAR(1) NOT NULL
-);
-
-ALTER TABLE SENTRY_DB_PRIVILEGE ADD CONSTRAINT SENTRY_DB_PRIVILEGE_PK PRIMARY KEY (DB_PRIVILEGE_ID);
-
--- Table SENTRY_ROLE for classes [org.apache.sentry.provider.db.service.model.MSentryRole]
-CREATE TABLE SENTRY_ROLE
-(
-    ROLE_ID BIGINT NOT NULL generated always as identity (start with 1),
-    CREATE_TIME BIGINT NOT NULL,
-    ROLE_NAME VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_ROLE ADD CONSTRAINT SENTRY_ROLE_PK PRIMARY KEY (ROLE_ID);
-
--- Table SENTRY_GROUP for classes [org.apache.sentry.provider.db.service.model.MSentryGroup]
-CREATE TABLE SENTRY_GROUP
-(
-    GROUP_ID BIGINT NOT NULL generated always as identity (start with 1),
-    CREATE_TIME BIGINT NOT NULL,
-    GROUP_NAME VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_GROUP ADD CONSTRAINT SENTRY_GROUP_PK PRIMARY KEY (GROUP_ID);
-
--- Table SENTRY_ROLE_GROUP_MAP for join relationship
-CREATE TABLE SENTRY_ROLE_GROUP_MAP
-(
-    GROUP_ID BIGINT NOT NULL,
-    ROLE_ID BIGINT NOT NULL,
-    GRANTOR_PRINCIPAL VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_PK PRIMARY KEY (GROUP_ID,ROLE_ID);
-
--- Table SENTRY_ROLE_DB_PRIVILEGE_MAP for join relationship
-CREATE TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP
-(
-    ROLE_ID BIGINT NOT NULL,
-    DB_PRIVILEGE_ID BIGINT NOT NULL,
-    GRANTOR_PRINCIPAL VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_PK PRIMARY KEY (ROLE_ID,DB_PRIVILEGE_ID);
-
-CREATE TABLE "SENTRY_VERSION" (
-  VER_ID BIGINT NOT NULL,
-  SCHEMA_VERSION VARCHAR(127),
-  VERSION_COMMENT VARCHAR(255)
-);
-
-ALTER TABLE SENTRY_VERSION ADD CONSTRAINT SENTRY_VERSION_PK PRIMARY KEY (VER_ID);
-
--- Constraints for table SENTRY_DB_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryPrivilege]
-CREATE UNIQUE INDEX SENTRYPRIVILEGENAME ON SENTRY_DB_PRIVILEGE ("SERVER_NAME",DB_NAME,"TABLE_NAME","COLUMN_NAME",URI,"ACTION",WITH_GRANT_OPTION);
-
-
--- Constraints for table SENTRY_ROLE for class(es) [org.apache.sentry.provider.db.service.model.MSentryRole]
-CREATE UNIQUE INDEX SENTRYROLENAME ON SENTRY_ROLE (ROLE_NAME);
-
-
--- Constraints for table SENTRY_GROUP for class(es) [org.apache.sentry.provider.db.service.model.MSentryGroup]
-CREATE UNIQUE INDEX SENTRYGROUPNAME ON SENTRY_GROUP (GROUP_NAME);
-
-
--- Constraints for table SENTRY_ROLE_GROUP_MAP
-CREATE INDEX SENTRY_ROLE_GROUP_MAP_N49 ON SENTRY_ROLE_GROUP_MAP (GROUP_ID);
-
-CREATE INDEX SENTRY_ROLE_GROUP_MAP_N50 ON SENTRY_ROLE_GROUP_MAP (ROLE_ID);
-
-ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_FK2 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
-
-ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_FK1 FOREIGN KEY (GROUP_ID) REFERENCES SENTRY_GROUP (GROUP_ID) ;
-
-
--- Constraints for table SENTRY_ROLE_DB_PRIVILEGE_MAP
-CREATE INDEX SENTRY_ROLE_DB_PRIVILEGE_MAP_N50 ON SENTRY_ROLE_DB_PRIVILEGE_MAP (ROLE_ID);
-
-CREATE INDEX SENTRY_ROLE_DB_PRIVILEGE_MAP_N49 ON SENTRY_ROLE_DB_PRIVILEGE_MAP (DB_PRIVILEGE_ID);
-
-ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_FK2 FOREIGN KEY (DB_PRIVILEGE_ID) REFERENCES SENTRY_DB_PRIVILEGE (DB_PRIVILEGE_ID) ;
-
-ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_FK1 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
-
-INSERT INTO SENTRY_VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '1.8.0', 'Sentry release version 1.8.0');
-
--- Generic model
--- Table SENTRY_GM_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
-CREATE TABLE SENTRY_GM_PRIVILEGE
-(
-    GM_PRIVILEGE_ID BIGINT NOT NULL,
-    "ACTION" VARCHAR(40),
-    COMPONENT_NAME VARCHAR(400),
-    CREATE_TIME BIGINT NOT NULL,
-    WITH_GRANT_OPTION CHAR(1),
-    RESOURCE_NAME_0 VARCHAR(400),
-    RESOURCE_NAME_1 VARCHAR(400),
-    RESOURCE_NAME_2 VARCHAR(400),
-    RESOURCE_NAME_3 VARCHAR(400),
-    RESOURCE_TYPE_0 VARCHAR(400),
-    RESOURCE_TYPE_1 VARCHAR(400),
-    RESOURCE_TYPE_2 VARCHAR(400),
-    RESOURCE_TYPE_3 VARCHAR(400),
-    "SCOPE" VARCHAR(40),
-    SERVICE_NAME VARCHAR(400)
-);
--- Primary key(GM_PRIVILEGE_ID)
-ALTER TABLE SENTRY_GM_PRIVILEGE ADD CONSTRAINT SENTRY_GM_PRIVILEGE_PK PRIMARY KEY (GM_PRIVILEGE_ID);
-
--- Constraints for table SENTRY_GM_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
-CREATE UNIQUE INDEX GM_PRIVILEGE_INDEX ON SENTRY_GM_PRIVILEGE (COMPONENT_NAME,SERVICE_NAME,RESOURCE_NAME_0,RESOURCE_TYPE_0,RESOURCE_NAME_1,RESOURCE_TYPE_1,RESOURCE_NAME_2,RESOURCE_TYPE_2,RESOURCE_NAME_3,RESOURCE_TYPE_3,"ACTION",WITH_GRANT_OPTION);
-
--- Table SENTRY_ROLE_GM_PRIVILEGE_MAP for join relationship
-CREATE TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP
-(
-    ROLE_ID BIGINT NOT NULL,
-    GM_PRIVILEGE_ID BIGINT NOT NULL
-);
-ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_PK PRIMARY KEY (ROLE_ID,GM_PRIVILEGE_ID);
-
--- Constraints for table SENTRY_ROLE_GM_PRIVILEGE_MAP
-CREATE INDEX SENTRY_ROLE_GM_PRIVILEGE_MAP_N50 ON SENTRY_ROLE_GM_PRIVILEGE_MAP (ROLE_ID);
-
-CREATE INDEX SENTRY_ROLE_GM_PRIVILEGE_MAP_N49 ON SENTRY_ROLE_GM_PRIVILEGE_MAP (GM_PRIVILEGE_ID);
-
-ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_FK2 FOREIGN KEY (GM_PRIVILEGE_ID) REFERENCES SENTRY_GM_PRIVILEGE (GM_PRIVILEGE_ID);
-
-ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_FK1 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID);
-
-CREATE TABLE SENTRY_USER
-(
-    USER_ID BIGINT NOT NULL generated always as identity (start with 1),
-    CREATE_TIME BIGINT NOT NULL,
-    USER_NAME VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_USER ADD CONSTRAINT SENTRY_USER_PK PRIMARY KEY (USER_ID);
-
-CREATE UNIQUE INDEX SENTRYUSERNAME ON SENTRY_USER (USER_NAME);
-
-CREATE TABLE SENTRY_ROLE_USER_MAP
-(
-    USER_ID BIGINT NOT NULL,
-    ROLE_ID BIGINT NOT NULL,
-    GRANTOR_PRINCIPAL VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_PK PRIMARY KEY (USER_ID,ROLE_ID);
-
-CREATE INDEX SENTRY_ROLE_USER_MAP_N49 ON SENTRY_ROLE_USER_MAP (USER_ID);
-
-CREATE INDEX SENTRY_ROLE_USER_MAP_N50 ON SENTRY_ROLE_USER_MAP (ROLE_ID);
-
-ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_FK2 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
-
-ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_FK1 FOREIGN KEY (USER_ID) REFERENCES SENTRY_USER (USER_ID) ;
-
--- Table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
-CREATE TABLE AUTHZ_PATHS_SNAPSHOT_ID
-(
-    AUTHZ_SNAPSHOT_ID BIGINT NOT NULL
-);
-
--- Constraints for table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
-ALTER TABLE AUTHZ_PATHS_SNAPSHOT_ID ADD CONSTRAINT AUTHZ_SNAPSHOT_ID_PK PRIMARY KEY (AUTHZ_SNAPSHOT_ID);
-
--- Table AUTHZ_PATHS_MAPPING for classes [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
-CREATE TABLE AUTHZ_PATHS_MAPPING(
-    AUTHZ_OBJ_ID BIGINT NOT NULL generated always as identity (start with 1),
-    AUTHZ_OBJ_NAME VARCHAR(384),
-    CREATE_TIME_MS BIGINT NOT NULL,
-    AUTHZ_SNAPSHOT_ID BIGINT NOT NULL
-);
-
-ALTER TABLE AUTHZ_PATHS_MAPPING ADD CONSTRAINT AUTHZ_PATHSCO7K_PK PRIMARY KEY (AUTHZ_OBJ_ID);
-
--- Constraints for table AUTHZ_PATHS_MAPPING for class(es) [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
-CREATE UNIQUE INDEX AUTHZOBJNAME ON AUTHZ_PATHS_MAPPING (AUTHZ_OBJ_NAME);
-
--- Table `AUTHZ_PATH` for classes [org.apache.sentry.provider.db.service.model.MPath]
-CREATE TABLE AUTHZ_PATH
- (
-    PATH_ID BIGINT NOT NULL,
-    PATH_NAME VARCHAR(4000),
-    AUTHZ_OBJ_ID BIGINT
-);
-
--- Constraints for table `AUTHZ_PATH`
-ALTER TABLE AUTHZ_PATH
-  ADD CONSTRAINT AUTHZ_PATH_PK PRIMARY KEY (PATH_ID);
-
-ALTER TABLE AUTHZ_PATH
-  ADD CONSTRAINT AUTHZ_PATH_FK
-  FOREIGN KEY (AUTHZ_OBJ_ID) REFERENCES AUTHZ_PATHS_MAPPING (AUTHZ_OBJ_ID);
-
--- Table SENTRY_PERM_CHANGE for classes [org.apache.sentry.provider.db.service.model.MSentryPermChange]
-CREATE TABLE SENTRY_PERM_CHANGE
-(
-    CHANGE_ID bigint NOT NULL,
-    CREATE_TIME_MS bigint NOT NULL,
-    PERM_CHANGE VARCHAR(4000) NOT NULL
-);
-
-ALTER TABLE SENTRY_PERM_CHANGE ADD CONSTRAINT SENTRY_PERM_CHANGE_PK PRIMARY KEY (CHANGE_ID);
-
--- Table SENTRY_PATH_CHANGE for classes [org.apache.sentry.provider.db.service.model.MSentryPathChange]
-CREATE TABLE SENTRY_PATH_CHANGE
-(
-    CHANGE_ID bigint NOT NULL,
-    NOTIFICATION_ID bigint NOT NULL,
-    CREATE_TIME_MS bigint NOT NULL,
-    PATH_CHANGE VARCHAR(4000) NOT NULL
-);
-
--- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
-ALTER TABLE SENTRY_PATH_CHANGE ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY (CHANGE_ID);
-CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
-
--- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
-CREATE TABLE SENTRY_HMS_NOTIFICATION_ID
-(
-    NOTIFICATION_ID bigint NOT NULL
-);
-
--- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
-ALTER TABLE SENTRY_HMS_NOTIFICATION_ID ADD CONSTRAINT NOTIFICATION_PRIVILEGE_PK PRIMARY KEY (NOTIFICATION_ID);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-2.0.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-2.0.0.sql b/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-2.0.0.sql
new file mode 100644
index 0000000..01be509
--- /dev/null
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-2.0.0.sql
@@ -0,0 +1,253 @@
+--Licensed to the Apache Software Foundation (ASF) under one or more
+--contributor license agreements.  See the NOTICE file distributed with
+--this work for additional information regarding copyright ownership.
+--The ASF licenses this file to You under the Apache License, Version 2.0
+--(the "License"); you may not use this file except in compliance with
+--the License.  You may obtain a copy of the License at
+--
+--    http://www.apache.org/licenses/LICENSE-2.0
+--
+--Unless required by applicable law or agreed to in writing, software
+--distributed under the License is distributed on an "AS IS" BASIS,
+--WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--See the License for the specific language governing permissions and
+--limitations under the License.
+
+-- Table SENTRY_DB_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryPrivilege]
+CREATE TABLE SENTRY_DB_PRIVILEGE
+(
+    DB_PRIVILEGE_ID BIGINT NOT NULL generated always as identity (start with 1),
+    URI VARCHAR(4000),
+    "ACTION" VARCHAR(40),
+    CREATE_TIME BIGINT NOT NULL,
+    DB_NAME VARCHAR(4000),
+    PRIVILEGE_SCOPE VARCHAR(40),
+    "SERVER_NAME" VARCHAR(4000),
+    "TABLE_NAME" VARCHAR(4000),
+    "COLUMN_NAME" VARCHAR(4000),
+    WITH_GRANT_OPTION CHAR(1) NOT NULL
+);
+
+ALTER TABLE SENTRY_DB_PRIVILEGE ADD CONSTRAINT SENTRY_DB_PRIVILEGE_PK PRIMARY KEY (DB_PRIVILEGE_ID);
+
+-- Table SENTRY_ROLE for classes [org.apache.sentry.provider.db.service.model.MSentryRole]
+CREATE TABLE SENTRY_ROLE
+(
+    ROLE_ID BIGINT NOT NULL generated always as identity (start with 1),
+    CREATE_TIME BIGINT NOT NULL,
+    ROLE_NAME VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_ROLE ADD CONSTRAINT SENTRY_ROLE_PK PRIMARY KEY (ROLE_ID);
+
+-- Table SENTRY_GROUP for classes [org.apache.sentry.provider.db.service.model.MSentryGroup]
+CREATE TABLE SENTRY_GROUP
+(
+    GROUP_ID BIGINT NOT NULL generated always as identity (start with 1),
+    CREATE_TIME BIGINT NOT NULL,
+    GROUP_NAME VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_GROUP ADD CONSTRAINT SENTRY_GROUP_PK PRIMARY KEY (GROUP_ID);
+
+-- Table SENTRY_ROLE_GROUP_MAP for join relationship
+CREATE TABLE SENTRY_ROLE_GROUP_MAP
+(
+    GROUP_ID BIGINT NOT NULL,
+    ROLE_ID BIGINT NOT NULL,
+    GRANTOR_PRINCIPAL VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_PK PRIMARY KEY (GROUP_ID,ROLE_ID);
+
+-- Table SENTRY_ROLE_DB_PRIVILEGE_MAP for join relationship
+CREATE TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP
+(
+    ROLE_ID BIGINT NOT NULL,
+    DB_PRIVILEGE_ID BIGINT NOT NULL,
+    GRANTOR_PRINCIPAL VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_PK PRIMARY KEY (ROLE_ID,DB_PRIVILEGE_ID);
+
+CREATE TABLE "SENTRY_VERSION" (
+  VER_ID BIGINT NOT NULL,
+  SCHEMA_VERSION VARCHAR(127),
+  VERSION_COMMENT VARCHAR(255)
+);
+
+ALTER TABLE SENTRY_VERSION ADD CONSTRAINT SENTRY_VERSION_PK PRIMARY KEY (VER_ID);
+
+-- Constraints for table SENTRY_DB_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryPrivilege]
+CREATE UNIQUE INDEX SENTRYPRIVILEGENAME ON SENTRY_DB_PRIVILEGE ("SERVER_NAME",DB_NAME,"TABLE_NAME","COLUMN_NAME",URI,"ACTION",WITH_GRANT_OPTION);
+
+
+-- Constraints for table SENTRY_ROLE for class(es) [org.apache.sentry.provider.db.service.model.MSentryRole]
+CREATE UNIQUE INDEX SENTRYROLENAME ON SENTRY_ROLE (ROLE_NAME);
+
+
+-- Constraints for table SENTRY_GROUP for class(es) [org.apache.sentry.provider.db.service.model.MSentryGroup]
+CREATE UNIQUE INDEX SENTRYGROUPNAME ON SENTRY_GROUP (GROUP_NAME);
+
+
+-- Constraints for table SENTRY_ROLE_GROUP_MAP
+CREATE INDEX SENTRY_ROLE_GROUP_MAP_N49 ON SENTRY_ROLE_GROUP_MAP (GROUP_ID);
+
+CREATE INDEX SENTRY_ROLE_GROUP_MAP_N50 ON SENTRY_ROLE_GROUP_MAP (ROLE_ID);
+
+ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_FK2 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
+
+ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_FK1 FOREIGN KEY (GROUP_ID) REFERENCES SENTRY_GROUP (GROUP_ID) ;
+
+
+-- Constraints for table SENTRY_ROLE_DB_PRIVILEGE_MAP
+CREATE INDEX SENTRY_ROLE_DB_PRIVILEGE_MAP_N50 ON SENTRY_ROLE_DB_PRIVILEGE_MAP (ROLE_ID);
+
+CREATE INDEX SENTRY_ROLE_DB_PRIVILEGE_MAP_N49 ON SENTRY_ROLE_DB_PRIVILEGE_MAP (DB_PRIVILEGE_ID);
+
+ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_FK2 FOREIGN KEY (DB_PRIVILEGE_ID) REFERENCES SENTRY_DB_PRIVILEGE (DB_PRIVILEGE_ID) ;
+
+ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_FK1 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
+
+INSERT INTO SENTRY_VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '2.0.0', 'Sentry release version 2.0.0');
+
+-- Generic model
+-- Table SENTRY_GM_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
+CREATE TABLE SENTRY_GM_PRIVILEGE
+(
+    GM_PRIVILEGE_ID BIGINT NOT NULL,
+    "ACTION" VARCHAR(40),
+    COMPONENT_NAME VARCHAR(400),
+    CREATE_TIME BIGINT NOT NULL,
+    WITH_GRANT_OPTION CHAR(1),
+    RESOURCE_NAME_0 VARCHAR(400),
+    RESOURCE_NAME_1 VARCHAR(400),
+    RESOURCE_NAME_2 VARCHAR(400),
+    RESOURCE_NAME_3 VARCHAR(400),
+    RESOURCE_TYPE_0 VARCHAR(400),
+    RESOURCE_TYPE_1 VARCHAR(400),
+    RESOURCE_TYPE_2 VARCHAR(400),
+    RESOURCE_TYPE_3 VARCHAR(400),
+    "SCOPE" VARCHAR(40),
+    SERVICE_NAME VARCHAR(400)
+);
+-- Primary key(GM_PRIVILEGE_ID)
+ALTER TABLE SENTRY_GM_PRIVILEGE ADD CONSTRAINT SENTRY_GM_PRIVILEGE_PK PRIMARY KEY (GM_PRIVILEGE_ID);
+
+-- Constraints for table SENTRY_GM_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
+CREATE UNIQUE INDEX GM_PRIVILEGE_INDEX ON SENTRY_GM_PRIVILEGE (COMPONENT_NAME,SERVICE_NAME,RESOURCE_NAME_0,RESOURCE_TYPE_0,RESOURCE_NAME_1,RESOURCE_TYPE_1,RESOURCE_NAME_2,RESOURCE_TYPE_2,RESOURCE_NAME_3,RESOURCE_TYPE_3,"ACTION",WITH_GRANT_OPTION);
+
+-- Table SENTRY_ROLE_GM_PRIVILEGE_MAP for join relationship
+CREATE TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP
+(
+    ROLE_ID BIGINT NOT NULL,
+    GM_PRIVILEGE_ID BIGINT NOT NULL
+);
+ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_PK PRIMARY KEY (ROLE_ID,GM_PRIVILEGE_ID);
+
+-- Constraints for table SENTRY_ROLE_GM_PRIVILEGE_MAP
+CREATE INDEX SENTRY_ROLE_GM_PRIVILEGE_MAP_N50 ON SENTRY_ROLE_GM_PRIVILEGE_MAP (ROLE_ID);
+
+CREATE INDEX SENTRY_ROLE_GM_PRIVILEGE_MAP_N49 ON SENTRY_ROLE_GM_PRIVILEGE_MAP (GM_PRIVILEGE_ID);
+
+ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_FK2 FOREIGN KEY (GM_PRIVILEGE_ID) REFERENCES SENTRY_GM_PRIVILEGE (GM_PRIVILEGE_ID);
+
+ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_FK1 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID);
+
+CREATE TABLE SENTRY_USER
+(
+    USER_ID BIGINT NOT NULL generated always as identity (start with 1),
+    CREATE_TIME BIGINT NOT NULL,
+    USER_NAME VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_USER ADD CONSTRAINT SENTRY_USER_PK PRIMARY KEY (USER_ID);
+
+CREATE UNIQUE INDEX SENTRYUSERNAME ON SENTRY_USER (USER_NAME);
+
+CREATE TABLE SENTRY_ROLE_USER_MAP
+(
+    USER_ID BIGINT NOT NULL,
+    ROLE_ID BIGINT NOT NULL,
+    GRANTOR_PRINCIPAL VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_PK PRIMARY KEY (USER_ID,ROLE_ID);
+
+CREATE INDEX SENTRY_ROLE_USER_MAP_N49 ON SENTRY_ROLE_USER_MAP (USER_ID);
+
+CREATE INDEX SENTRY_ROLE_USER_MAP_N50 ON SENTRY_ROLE_USER_MAP (ROLE_ID);
+
+ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_FK2 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
+
+ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_FK1 FOREIGN KEY (USER_ID) REFERENCES SENTRY_USER (USER_ID) ;
+
+-- Table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
+CREATE TABLE AUTHZ_PATHS_SNAPSHOT_ID
+(
+    AUTHZ_SNAPSHOT_ID BIGINT NOT NULL
+);
+
+-- Constraints for table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
+ALTER TABLE AUTHZ_PATHS_SNAPSHOT_ID ADD CONSTRAINT AUTHZ_SNAPSHOT_ID_PK PRIMARY KEY (AUTHZ_SNAPSHOT_ID);
+
+-- Table AUTHZ_PATHS_MAPPING for classes [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
+CREATE TABLE AUTHZ_PATHS_MAPPING(
+    AUTHZ_OBJ_ID BIGINT NOT NULL generated always as identity (start with 1),
+    AUTHZ_OBJ_NAME VARCHAR(384),
+    CREATE_TIME_MS BIGINT NOT NULL,
+    AUTHZ_SNAPSHOT_ID BIGINT NOT NULL
+);
+
+ALTER TABLE AUTHZ_PATHS_MAPPING ADD CONSTRAINT AUTHZ_PATHSCO7K_PK PRIMARY KEY (AUTHZ_OBJ_ID);
+
+-- Constraints for table AUTHZ_PATHS_MAPPING for class(es) [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
+CREATE UNIQUE INDEX AUTHZOBJNAME ON AUTHZ_PATHS_MAPPING (AUTHZ_OBJ_NAME);
+
+-- Table `AUTHZ_PATH` for classes [org.apache.sentry.provider.db.service.model.MPath]
+CREATE TABLE AUTHZ_PATH
+ (
+    PATH_ID BIGINT NOT NULL,
+    PATH_NAME VARCHAR(4000),
+    AUTHZ_OBJ_ID BIGINT
+);
+
+-- Constraints for table `AUTHZ_PATH`
+ALTER TABLE AUTHZ_PATH
+  ADD CONSTRAINT AUTHZ_PATH_PK PRIMARY KEY (PATH_ID);
+
+ALTER TABLE AUTHZ_PATH
+  ADD CONSTRAINT AUTHZ_PATH_FK
+  FOREIGN KEY (AUTHZ_OBJ_ID) REFERENCES AUTHZ_PATHS_MAPPING (AUTHZ_OBJ_ID);
+
+-- Table SENTRY_PERM_CHANGE for classes [org.apache.sentry.provider.db.service.model.MSentryPermChange]
+CREATE TABLE SENTRY_PERM_CHANGE
+(
+    CHANGE_ID bigint NOT NULL,
+    CREATE_TIME_MS bigint NOT NULL,
+    PERM_CHANGE VARCHAR(4000) NOT NULL
+);
+
+ALTER TABLE SENTRY_PERM_CHANGE ADD CONSTRAINT SENTRY_PERM_CHANGE_PK PRIMARY KEY (CHANGE_ID);
+
+-- Table SENTRY_PATH_CHANGE for classes [org.apache.sentry.provider.db.service.model.MSentryPathChange]
+CREATE TABLE SENTRY_PATH_CHANGE
+(
+    CHANGE_ID bigint NOT NULL,
+    NOTIFICATION_ID bigint NOT NULL,
+    CREATE_TIME_MS bigint NOT NULL,
+    PATH_CHANGE VARCHAR(4000) NOT NULL
+);
+
+-- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
+ALTER TABLE SENTRY_PATH_CHANGE ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY (CHANGE_ID);
+CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE SENTRY_HMS_NOTIFICATION_ID
+(
+    NOTIFICATION_ID bigint NOT NULL
+);
+
+-- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+ALTER TABLE SENTRY_HMS_NOTIFICATION_ID ADD CONSTRAINT NOTIFICATION_PRIVILEGE_PK PRIMARY KEY (NOTIFICATION_ID);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql b/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
deleted file mode 100644
index 077dbe1..0000000
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
+++ /dev/null
@@ -1,254 +0,0 @@
---Licensed to the Apache Software Foundation (ASF) under one or more
---contributor license agreements.  See the NOTICE file distributed with
---this work for additional information regarding copyright ownership.
---The ASF licenses this file to You under the Apache License, Version 2.0
---(the "License"); you may not use this file except in compliance with
---the License.  You may obtain a copy of the License at
---
---    http://www.apache.org/licenses/LICENSE-2.0
---
---Unless required by applicable law or agreed to in writing, software
---distributed under the License is distributed on an "AS IS" BASIS,
---WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
---See the License for the specific language governing permissions and
---limitations under the License.
-
--- Table SENTRY_DB_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryPrivilege]
-CREATE TABLE SENTRY_DB_PRIVILEGE
-(
-    DB_PRIVILEGE_ID BIGINT NOT NULL generated always as identity (start with 1),
-    URI VARCHAR(4000) DEFAULT '__NULL__',
-    "ACTION" VARCHAR(40),
-    CREATE_TIME BIGINT NOT NULL,
-    DB_NAME VARCHAR(4000) DEFAULT '__NULL__',
-    PRIVILEGE_SCOPE VARCHAR(40),
-    "SERVER_NAME" VARCHAR(4000),
-    "TABLE_NAME" VARCHAR(4000) DEFAULT '__NULL__',
-    "COLUMN_NAME" VARCHAR(4000) DEFAULT '__NULL__',
-    WITH_GRANT_OPTION CHAR(1) NOT NULL
-);
-
-ALTER TABLE SENTRY_DB_PRIVILEGE ADD CONSTRAINT SENTRY_DB_PRIVILEGE_PK PRIMARY KEY (DB_PRIVILEGE_ID);
-
--- Table SENTRY_ROLE for classes [org.apache.sentry.provider.db.service.model.MSentryRole]
-CREATE TABLE SENTRY_ROLE
-(
-    ROLE_ID BIGINT NOT NULL generated always as identity (start with 1),
-    CREATE_TIME BIGINT NOT NULL,
-    ROLE_NAME VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_ROLE ADD CONSTRAINT SENTRY_ROLE_PK PRIMARY KEY (ROLE_ID);
-
--- Table SENTRY_GROUP for classes [org.apache.sentry.provider.db.service.model.MSentryGroup]
-CREATE TABLE SENTRY_GROUP
-(
-    GROUP_ID BIGINT NOT NULL generated always as identity (start with 1),
-    CREATE_TIME BIGINT NOT NULL,
-    GROUP_NAME VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_GROUP ADD CONSTRAINT SENTRY_GROUP_PK PRIMARY KEY (GROUP_ID);
-
--- Table SENTRY_ROLE_GROUP_MAP for join relationship
-CREATE TABLE SENTRY_ROLE_GROUP_MAP
-(
-    GROUP_ID BIGINT NOT NULL,
-    ROLE_ID BIGINT NOT NULL,
-    GRANTOR_PRINCIPAL VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_PK PRIMARY KEY (GROUP_ID,ROLE_ID);
-
--- Table SENTRY_ROLE_DB_PRIVILEGE_MAP for join relationship
-CREATE TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP
-(
-    ROLE_ID BIGINT NOT NULL,
-    DB_PRIVILEGE_ID BIGINT NOT NULL,
-    GRANTOR_PRINCIPAL VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_PK PRIMARY KEY (ROLE_ID,DB_PRIVILEGE_ID);
-
-CREATE TABLE "SENTRY_VERSION" (
-  VER_ID BIGINT NOT NULL,
-  SCHEMA_VERSION VARCHAR(127),
-  VERSION_COMMENT VARCHAR(255)
-);
-
-ALTER TABLE SENTRY_VERSION ADD CONSTRAINT SENTRY_VERSION_PK PRIMARY KEY (VER_ID);
-
--- Constraints for table SENTRY_DB_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryPrivilege]
-CREATE UNIQUE INDEX SENTRYPRIVILEGENAME ON SENTRY_DB_PRIVILEGE ("SERVER_NAME",DB_NAME,"TABLE_NAME","COLUMN_NAME",URI,"ACTION",WITH_GRANT_OPTION);
-
-
--- Constraints for table SENTRY_ROLE for class(es) [org.apache.sentry.provider.db.service.model.MSentryRole]
-CREATE UNIQUE INDEX SENTRYROLENAME ON SENTRY_ROLE (ROLE_NAME);
-
-
--- Constraints for table SENTRY_GROUP for class(es) [org.apache.sentry.provider.db.service.model.MSentryGroup]
-CREATE UNIQUE INDEX SENTRYGROUPNAME ON SENTRY_GROUP (GROUP_NAME);
-
-
--- Constraints for table SENTRY_ROLE_GROUP_MAP
-CREATE INDEX SENTRY_ROLE_GROUP_MAP_N49 ON SENTRY_ROLE_GROUP_MAP (GROUP_ID);
-
-CREATE INDEX SENTRY_ROLE_GROUP_MAP_N50 ON SENTRY_ROLE_GROUP_MAP (ROLE_ID);
-
-ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_FK2 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
-
-ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_FK1 FOREIGN KEY (GROUP_ID) REFERENCES SENTRY_GROUP (GROUP_ID) ;
-
-
--- Constraints for table SENTRY_ROLE_DB_PRIVILEGE_MAP
-CREATE INDEX SENTRY_ROLE_DB_PRIVILEGE_MAP_N50 ON SENTRY_ROLE_DB_PRIVILEGE_MAP (ROLE_ID);
-
-CREATE INDEX SENTRY_ROLE_DB_PRIVILEGE_MAP_N49 ON SENTRY_ROLE_DB_PRIVILEGE_MAP (DB_PRIVILEGE_ID);
-
-ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_FK2 FOREIGN KEY (DB_PRIVILEGE_ID) REFERENCES SENTRY_DB_PRIVILEGE (DB_PRIVILEGE_ID) ;
-
-ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_FK1 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
-
-INSERT INTO SENTRY_VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '1.8.0', 'Sentry release version 1.8.0');
-
--- Generic Model
--- Table SENTRY_GM_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
-CREATE TABLE SENTRY_GM_PRIVILEGE
-(
-    GM_PRIVILEGE_ID BIGINT NOT NULL,
-    "ACTION" VARCHAR(40),
-    COMPONENT_NAME VARCHAR(400),
-    CREATE_TIME BIGINT NOT NULL,
-    WITH_GRANT_OPTION CHAR(1),
-    RESOURCE_NAME_0 VARCHAR(400) DEFAULT '__NULL__',
-    RESOURCE_NAME_1 VARCHAR(400) DEFAULT '__NULL__',
-    RESOURCE_NAME_2 VARCHAR(400) DEFAULT '__NULL__',
-    RESOURCE_NAME_3 VARCHAR(400) DEFAULT '__NULL__',
-    RESOURCE_TYPE_0 VARCHAR(400) DEFAULT '__NULL__',
-    RESOURCE_TYPE_1 VARCHAR(400) DEFAULT '__NULL__',
-    RESOURCE_TYPE_2 VARCHAR(400) DEFAULT '__NULL__',
-    RESOURCE_TYPE_3 VARCHAR(400) DEFAULT '__NULL__',
-    "SCOPE" VARCHAR(40),
-    SERVICE_NAME VARCHAR(400)
-);
--- Primary key(GM_PRIVILEGE_ID)
-ALTER TABLE SENTRY_GM_PRIVILEGE ADD CONSTRAINT SENTRY_GM_PRIVILEGE_PK PRIMARY KEY (GM_PRIVILEGE_ID);
-
--- Constraints for table SENTRY_GM_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
-CREATE UNIQUE INDEX GM_PRIVILEGE_INDEX ON SENTRY_GM_PRIVILEGE (COMPONENT_NAME,SERVICE_NAME,RESOURCE_NAME_0,RESOURCE_TYPE_0,RESOURCE_NAME_1,RESOURCE_TYPE_1,RESOURCE_NAME_2,RESOURCE_TYPE_2,RESOURCE_NAME_3,RESOURCE_TYPE_3,"ACTION",WITH_GRANT_OPTION);
-
--- Table SENTRY_ROLE_GM_PRIVILEGE_MAP for join relationship
-CREATE TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP
-(
-    ROLE_ID BIGINT NOT NULL,
-    GM_PRIVILEGE_ID BIGINT NOT NULL
-);
-ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_PK PRIMARY KEY (ROLE_ID,GM_PRIVILEGE_ID);
-
--- Constraints for table SENTRY_ROLE_GM_PRIVILEGE_MAP
-CREATE INDEX SENTRY_ROLE_GM_PRIVILEGE_MAP_N50 ON SENTRY_ROLE_GM_PRIVILEGE_MAP (ROLE_ID);
-
-CREATE INDEX SENTRY_ROLE_GM_PRIVILEGE_MAP_N49 ON SENTRY_ROLE_GM_PRIVILEGE_MAP (GM_PRIVILEGE_ID);
-
-ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_FK2 FOREIGN KEY (GM_PRIVILEGE_ID) REFERENCES SENTRY_GM_PRIVILEGE (GM_PRIVILEGE_ID);
-
-ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_FK1 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID);
-
-CREATE TABLE SENTRY_USER
-(
-    USER_ID BIGINT NOT NULL generated always as identity (start with 1),
-    CREATE_TIME BIGINT NOT NULL,
-    USER_NAME VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_USER ADD CONSTRAINT SENTRY_USER_PK PRIMARY KEY (USER_ID);
-
-CREATE UNIQUE INDEX SENTRYUSERNAME ON SENTRY_USER (USER_NAME);
-
-CREATE TABLE SENTRY_ROLE_USER_MAP
-(
-    USER_ID BIGINT NOT NULL,
-    ROLE_ID BIGINT NOT NULL,
-    GRANTOR_PRINCIPAL VARCHAR(128)
-);
-
-ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_PK PRIMARY KEY (USER_ID,ROLE_ID);
-
-CREATE INDEX SENTRY_ROLE_USER_MAP_N49 ON SENTRY_ROLE_USER_MAP (USER_ID);
-
-CREATE INDEX SENTRY_ROLE_USER_MAP_N50 ON SENTRY_ROLE_USER_MAP (ROLE_ID);
-
-ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_FK2 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
-
-ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_FK1 FOREIGN KEY (USER_ID) REFERENCES SENTRY_USER (USER_ID) ;
-
--- Table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
-CREATE TABLE AUTHZ_PATHS_SNAPSHOT_ID
-(
-    AUTHZ_SNAPSHOT_ID BIGINT NOT NULL
-);
-
--- Constraints for table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
-ALTER TABLE AUTHZ_PATHS_SNAPSHOT_ID ADD CONSTRAINT AUTHZ_SNAPSHOT_ID_PK PRIMARY KEY (AUTHZ_SNAPSHOT_ID);
-
-CREATE TABLE AUTHZ_PATHS_MAPPING
-(
-    AUTHZ_OBJ_ID BIGINT NOT NULL generated always as identity (start with 1),
-    AUTHZ_OBJ_NAME VARCHAR(384),
-    CREATE_TIME_MS BIGINT NOT NULL,
-    AUTHZ_SNAPSHOT_ID BIGINT NOT NULL
-);
-
-ALTER TABLE AUTHZ_PATHS_MAPPING ADD CONSTRAINT AUTHZ_PATHS_MAPPING_PK PRIMARY KEY (AUTHZ_OBJ_ID);
-
--- Constraints for table AUTHZ_PATHS_MAPPING for class(es) [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
-CREATE UNIQUE INDEX AUTHZOBJNAME ON AUTHZ_PATHS_MAPPING (AUTHZ_OBJ_NAME);
-
--- Table `AUTHZ_PATH` for classes [org.apache.sentry.provider.db.service.model.MPath]
-CREATE TABLE AUTHZ_PATH
- (
-    PATH_ID BIGINT NOT NULL,
-    PATH_NAME VARCHAR(4000),
-    AUTHZ_OBJ_ID BIGINT
-);
-
--- Constraints for table `AUTHZ_PATH`
-ALTER TABLE AUTHZ_PATH
-  ADD CONSTRAINT AUTHZ_PATH_PK PRIMARY KEY (PATH_ID);
-
-ALTER TABLE AUTHZ_PATH
-  ADD CONSTRAINT AUTHZ_PATH_FK
-  FOREIGN KEY (AUTHZ_OBJ_ID) REFERENCES AUTHZ_PATHS_MAPPING (AUTHZ_OBJ_ID);
-
--- Table SENTRY_PERM_CHANGE for classes [org.apache.sentry.provider.db.service.model.MSentryPermChange]
-CREATE TABLE SENTRY_PERM_CHANGE
-(
-    CHANGE_ID BIGINT NOT NULL,
-    CREATE_TIME_MS BIGINT NOT NULL,
-    PERM_CHANGE VARCHAR(4000) NOT NULL
-);
-
-ALTER TABLE SENTRY_PERM_CHANGE ADD CONSTRAINT SENTRY_PERM_CHANGE_PK PRIMARY KEY (CHANGE_ID);
-
--- Table SENTRY_PATH_CHANGE for classes [org.apache.sentry.provider.db.service.model.MSentryPathChange]
-CREATE TABLE SENTRY_PATH_CHANGE
-(
-    CHANGE_ID BIGINT NOT NULL,
-    NOTIFICATION_ID BIGINT NOT NULL,
-    CREATE_TIME_MS BIGINT NOT NULL,
-    PATH_CHANGE VARCHAR(4000) NOT NULL
-);
-
--- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
-ALTER TABLE SENTRY_PATH_CHANGE ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY (CHANGE_ID);
-CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
-
-
--- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
-CREATE TABLE SENTRY_HMS_NOTIFICATION_ID
-(
-    NOTIFICATION_ID BIGINT NOT NULL
-);
-
--- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
-ALTER TABLE SENTRY_HMS_NOTIFICATION_ID ADD CONSTRAINT SENTRY_NOTIFICATION_PK PRIMARY KEY (NOTIFICATION_ID);

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-2.0.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-2.0.0.sql b/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-2.0.0.sql
new file mode 100644
index 0000000..dca9e47
--- /dev/null
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-2.0.0.sql
@@ -0,0 +1,254 @@
+--Licensed to the Apache Software Foundation (ASF) under one or more
+--contributor license agreements.  See the NOTICE file distributed with
+--this work for additional information regarding copyright ownership.
+--The ASF licenses this file to You under the Apache License, Version 2.0
+--(the "License"); you may not use this file except in compliance with
+--the License.  You may obtain a copy of the License at
+--
+--    http://www.apache.org/licenses/LICENSE-2.0
+--
+--Unless required by applicable law or agreed to in writing, software
+--distributed under the License is distributed on an "AS IS" BASIS,
+--WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--See the License for the specific language governing permissions and
+--limitations under the License.
+
+-- Table SENTRY_DB_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryPrivilege]
+CREATE TABLE SENTRY_DB_PRIVILEGE
+(
+    DB_PRIVILEGE_ID BIGINT NOT NULL generated always as identity (start with 1),
+    URI VARCHAR(4000) DEFAULT '__NULL__',
+    "ACTION" VARCHAR(40),
+    CREATE_TIME BIGINT NOT NULL,
+    DB_NAME VARCHAR(4000) DEFAULT '__NULL__',
+    PRIVILEGE_SCOPE VARCHAR(40),
+    "SERVER_NAME" VARCHAR(4000),
+    "TABLE_NAME" VARCHAR(4000) DEFAULT '__NULL__',
+    "COLUMN_NAME" VARCHAR(4000) DEFAULT '__NULL__',
+    WITH_GRANT_OPTION CHAR(1) NOT NULL
+);
+
+ALTER TABLE SENTRY_DB_PRIVILEGE ADD CONSTRAINT SENTRY_DB_PRIVILEGE_PK PRIMARY KEY (DB_PRIVILEGE_ID);
+
+-- Table SENTRY_ROLE for classes [org.apache.sentry.provider.db.service.model.MSentryRole]
+CREATE TABLE SENTRY_ROLE
+(
+    ROLE_ID BIGINT NOT NULL generated always as identity (start with 1),
+    CREATE_TIME BIGINT NOT NULL,
+    ROLE_NAME VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_ROLE ADD CONSTRAINT SENTRY_ROLE_PK PRIMARY KEY (ROLE_ID);
+
+-- Table SENTRY_GROUP for classes [org.apache.sentry.provider.db.service.model.MSentryGroup]
+CREATE TABLE SENTRY_GROUP
+(
+    GROUP_ID BIGINT NOT NULL generated always as identity (start with 1),
+    CREATE_TIME BIGINT NOT NULL,
+    GROUP_NAME VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_GROUP ADD CONSTRAINT SENTRY_GROUP_PK PRIMARY KEY (GROUP_ID);
+
+-- Table SENTRY_ROLE_GROUP_MAP for join relationship
+CREATE TABLE SENTRY_ROLE_GROUP_MAP
+(
+    GROUP_ID BIGINT NOT NULL,
+    ROLE_ID BIGINT NOT NULL,
+    GRANTOR_PRINCIPAL VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_PK PRIMARY KEY (GROUP_ID,ROLE_ID);
+
+-- Table SENTRY_ROLE_DB_PRIVILEGE_MAP for join relationship
+CREATE TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP
+(
+    ROLE_ID BIGINT NOT NULL,
+    DB_PRIVILEGE_ID BIGINT NOT NULL,
+    GRANTOR_PRINCIPAL VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_PK PRIMARY KEY (ROLE_ID,DB_PRIVILEGE_ID);
+
+CREATE TABLE "SENTRY_VERSION" (
+  VER_ID BIGINT NOT NULL,
+  SCHEMA_VERSION VARCHAR(127),
+  VERSION_COMMENT VARCHAR(255)
+);
+
+ALTER TABLE SENTRY_VERSION ADD CONSTRAINT SENTRY_VERSION_PK PRIMARY KEY (VER_ID);
+
+-- Constraints for table SENTRY_DB_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryPrivilege]
+CREATE UNIQUE INDEX SENTRYPRIVILEGENAME ON SENTRY_DB_PRIVILEGE ("SERVER_NAME",DB_NAME,"TABLE_NAME","COLUMN_NAME",URI,"ACTION",WITH_GRANT_OPTION);
+
+
+-- Constraints for table SENTRY_ROLE for class(es) [org.apache.sentry.provider.db.service.model.MSentryRole]
+CREATE UNIQUE INDEX SENTRYROLENAME ON SENTRY_ROLE (ROLE_NAME);
+
+
+-- Constraints for table SENTRY_GROUP for class(es) [org.apache.sentry.provider.db.service.model.MSentryGroup]
+CREATE UNIQUE INDEX SENTRYGROUPNAME ON SENTRY_GROUP (GROUP_NAME);
+
+
+-- Constraints for table SENTRY_ROLE_GROUP_MAP
+CREATE INDEX SENTRY_ROLE_GROUP_MAP_N49 ON SENTRY_ROLE_GROUP_MAP (GROUP_ID);
+
+CREATE INDEX SENTRY_ROLE_GROUP_MAP_N50 ON SENTRY_ROLE_GROUP_MAP (ROLE_ID);
+
+ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_FK2 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
+
+ALTER TABLE SENTRY_ROLE_GROUP_MAP ADD CONSTRAINT SENTRY_ROLE_GROUP_MAP_FK1 FOREIGN KEY (GROUP_ID) REFERENCES SENTRY_GROUP (GROUP_ID) ;
+
+
+-- Constraints for table SENTRY_ROLE_DB_PRIVILEGE_MAP
+CREATE INDEX SENTRY_ROLE_DB_PRIVILEGE_MAP_N50 ON SENTRY_ROLE_DB_PRIVILEGE_MAP (ROLE_ID);
+
+CREATE INDEX SENTRY_ROLE_DB_PRIVILEGE_MAP_N49 ON SENTRY_ROLE_DB_PRIVILEGE_MAP (DB_PRIVILEGE_ID);
+
+ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_FK2 FOREIGN KEY (DB_PRIVILEGE_ID) REFERENCES SENTRY_DB_PRIVILEGE (DB_PRIVILEGE_ID) ;
+
+ALTER TABLE SENTRY_ROLE_DB_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_DB_PRIVILEGE_MAP_FK1 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
+
+INSERT INTO SENTRY_VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '2.0.0', 'Sentry release version 2.0.0');
+
+-- Generic Model
+-- Table SENTRY_GM_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
+CREATE TABLE SENTRY_GM_PRIVILEGE
+(
+    GM_PRIVILEGE_ID BIGINT NOT NULL,
+    "ACTION" VARCHAR(40),
+    COMPONENT_NAME VARCHAR(400),
+    CREATE_TIME BIGINT NOT NULL,
+    WITH_GRANT_OPTION CHAR(1),
+    RESOURCE_NAME_0 VARCHAR(400) DEFAULT '__NULL__',
+    RESOURCE_NAME_1 VARCHAR(400) DEFAULT '__NULL__',
+    RESOURCE_NAME_2 VARCHAR(400) DEFAULT '__NULL__',
+    RESOURCE_NAME_3 VARCHAR(400) DEFAULT '__NULL__',
+    RESOURCE_TYPE_0 VARCHAR(400) DEFAULT '__NULL__',
+    RESOURCE_TYPE_1 VARCHAR(400) DEFAULT '__NULL__',
+    RESOURCE_TYPE_2 VARCHAR(400) DEFAULT '__NULL__',
+    RESOURCE_TYPE_3 VARCHAR(400) DEFAULT '__NULL__',
+    "SCOPE" VARCHAR(40),
+    SERVICE_NAME VARCHAR(400)
+);
+-- Primary key(GM_PRIVILEGE_ID)
+ALTER TABLE SENTRY_GM_PRIVILEGE ADD CONSTRAINT SENTRY_GM_PRIVILEGE_PK PRIMARY KEY (GM_PRIVILEGE_ID);
+
+-- Constraints for table SENTRY_GM_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
+CREATE UNIQUE INDEX GM_PRIVILEGE_INDEX ON SENTRY_GM_PRIVILEGE (COMPONENT_NAME,SERVICE_NAME,RESOURCE_NAME_0,RESOURCE_TYPE_0,RESOURCE_NAME_1,RESOURCE_TYPE_1,RESOURCE_NAME_2,RESOURCE_TYPE_2,RESOURCE_NAME_3,RESOURCE_TYPE_3,"ACTION",WITH_GRANT_OPTION);
+
+-- Table SENTRY_ROLE_GM_PRIVILEGE_MAP for join relationship
+CREATE TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP
+(
+    ROLE_ID BIGINT NOT NULL,
+    GM_PRIVILEGE_ID BIGINT NOT NULL
+);
+ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_PK PRIMARY KEY (ROLE_ID,GM_PRIVILEGE_ID);
+
+-- Constraints for table SENTRY_ROLE_GM_PRIVILEGE_MAP
+CREATE INDEX SENTRY_ROLE_GM_PRIVILEGE_MAP_N50 ON SENTRY_ROLE_GM_PRIVILEGE_MAP (ROLE_ID);
+
+CREATE INDEX SENTRY_ROLE_GM_PRIVILEGE_MAP_N49 ON SENTRY_ROLE_GM_PRIVILEGE_MAP (GM_PRIVILEGE_ID);
+
+ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_FK2 FOREIGN KEY (GM_PRIVILEGE_ID) REFERENCES SENTRY_GM_PRIVILEGE (GM_PRIVILEGE_ID);
+
+ALTER TABLE SENTRY_ROLE_GM_PRIVILEGE_MAP ADD CONSTRAINT SENTRY_ROLE_GM_PRIVILEGE_MAP_FK1 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID);
+
+CREATE TABLE SENTRY_USER
+(
+    USER_ID BIGINT NOT NULL generated always as identity (start with 1),
+    CREATE_TIME BIGINT NOT NULL,
+    USER_NAME VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_USER ADD CONSTRAINT SENTRY_USER_PK PRIMARY KEY (USER_ID);
+
+CREATE UNIQUE INDEX SENTRYUSERNAME ON SENTRY_USER (USER_NAME);
+
+CREATE TABLE SENTRY_ROLE_USER_MAP
+(
+    USER_ID BIGINT NOT NULL,
+    ROLE_ID BIGINT NOT NULL,
+    GRANTOR_PRINCIPAL VARCHAR(128)
+);
+
+ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_PK PRIMARY KEY (USER_ID,ROLE_ID);
+
+CREATE INDEX SENTRY_ROLE_USER_MAP_N49 ON SENTRY_ROLE_USER_MAP (USER_ID);
+
+CREATE INDEX SENTRY_ROLE_USER_MAP_N50 ON SENTRY_ROLE_USER_MAP (ROLE_ID);
+
+ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_FK2 FOREIGN KEY (ROLE_ID) REFERENCES SENTRY_ROLE (ROLE_ID) ;
+
+ALTER TABLE SENTRY_ROLE_USER_MAP ADD CONSTRAINT SENTRY_ROLE_USER_MAP_FK1 FOREIGN KEY (USER_ID) REFERENCES SENTRY_USER (USER_ID) ;
+
+-- Table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
+CREATE TABLE AUTHZ_PATHS_SNAPSHOT_ID
+(
+    AUTHZ_SNAPSHOT_ID BIGINT NOT NULL
+);
+
+-- Constraints for table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
+ALTER TABLE AUTHZ_PATHS_SNAPSHOT_ID ADD CONSTRAINT AUTHZ_SNAPSHOT_ID_PK PRIMARY KEY (AUTHZ_SNAPSHOT_ID);
+
+CREATE TABLE AUTHZ_PATHS_MAPPING
+(
+    AUTHZ_OBJ_ID BIGINT NOT NULL generated always as identity (start with 1),
+    AUTHZ_OBJ_NAME VARCHAR(384),
+    CREATE_TIME_MS BIGINT NOT NULL,
+    AUTHZ_SNAPSHOT_ID BIGINT NOT NULL
+);
+
+ALTER TABLE AUTHZ_PATHS_MAPPING ADD CONSTRAINT AUTHZ_PATHS_MAPPING_PK PRIMARY KEY (AUTHZ_OBJ_ID);
+
+-- Constraints for table AUTHZ_PATHS_MAPPING for class(es) [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
+CREATE UNIQUE INDEX AUTHZOBJNAME ON AUTHZ_PATHS_MAPPING (AUTHZ_OBJ_NAME);
+
+-- Table `AUTHZ_PATH` for classes [org.apache.sentry.provider.db.service.model.MPath]
+CREATE TABLE AUTHZ_PATH
+ (
+    PATH_ID BIGINT NOT NULL,
+    PATH_NAME VARCHAR(4000),
+    AUTHZ_OBJ_ID BIGINT
+);
+
+-- Constraints for table `AUTHZ_PATH`
+ALTER TABLE AUTHZ_PATH
+  ADD CONSTRAINT AUTHZ_PATH_PK PRIMARY KEY (PATH_ID);
+
+ALTER TABLE AUTHZ_PATH
+  ADD CONSTRAINT AUTHZ_PATH_FK
+  FOREIGN KEY (AUTHZ_OBJ_ID) REFERENCES AUTHZ_PATHS_MAPPING (AUTHZ_OBJ_ID);
+
+-- Table SENTRY_PERM_CHANGE for classes [org.apache.sentry.provider.db.service.model.MSentryPermChange]
+CREATE TABLE SENTRY_PERM_CHANGE
+(
+    CHANGE_ID BIGINT NOT NULL,
+    CREATE_TIME_MS BIGINT NOT NULL,
+    PERM_CHANGE VARCHAR(4000) NOT NULL
+);
+
+ALTER TABLE SENTRY_PERM_CHANGE ADD CONSTRAINT SENTRY_PERM_CHANGE_PK PRIMARY KEY (CHANGE_ID);
+
+-- Table SENTRY_PATH_CHANGE for classes [org.apache.sentry.provider.db.service.model.MSentryPathChange]
+CREATE TABLE SENTRY_PATH_CHANGE
+(
+    CHANGE_ID BIGINT NOT NULL,
+    NOTIFICATION_ID BIGINT NOT NULL,
+    CREATE_TIME_MS BIGINT NOT NULL,
+    PATH_CHANGE VARCHAR(4000) NOT NULL
+);
+
+-- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
+ALTER TABLE SENTRY_PATH_CHANGE ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY (CHANGE_ID);
+CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
+
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE SENTRY_HMS_NOTIFICATION_ID
+(
+    NOTIFICATION_ID BIGINT NOT NULL
+);
+
+-- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+ALTER TABLE SENTRY_HMS_NOTIFICATION_ID ADD CONSTRAINT SENTRY_NOTIFICATION_PK PRIMARY KEY (NOTIFICATION_ID);

http://git-wip-us.apache.org/repos/asf/sentry/blob/c8d0f24a/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql b/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
deleted file mode 100644
index 4066a50..0000000
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
+++ /dev/null
@@ -1,286 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to You under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
---    http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
-CREATE TABLE `SENTRY_DB_PRIVILEGE` (
-  `DB_PRIVILEGE_ID` BIGINT NOT NULL,
-  `PRIVILEGE_SCOPE` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `SERVER_NAME` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `DB_NAME` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-  `TABLE_NAME` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-  `COLUMN_NAME` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-  `URI` VARCHAR(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-  `ACTION` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `CREATE_TIME` BIGINT NOT NULL,
-  `WITH_GRANT_OPTION` CHAR(1) NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `SENTRY_ROLE` (
-  `ROLE_ID` BIGINT  NOT NULL,
-  `ROLE_NAME` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `CREATE_TIME` BIGINT NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `SENTRY_GROUP` (
-  `GROUP_ID` BIGINT  NOT NULL,
-  `GROUP_NAME` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-  `CREATE_TIME` BIGINT NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `SENTRY_ROLE_DB_PRIVILEGE_MAP` (
-  `ROLE_ID` BIGINT NOT NULL,
-  `DB_PRIVILEGE_ID` BIGINT NOT NULL,
-  `GRANTOR_PRINCIPAL` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE `SENTRY_ROLE_GROUP_MAP` (
-  `ROLE_ID` BIGINT NOT NULL,
-  `GROUP_ID` BIGINT NOT NULL,
-  `GRANTOR_PRINCIPAL` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-CREATE TABLE IF NOT EXISTS `SENTRY_VERSION` (
-  `VER_ID` BIGINT NOT NULL,
-  `SCHEMA_VERSION` VARCHAR(127) NOT NULL,
-  `VERSION_COMMENT` VARCHAR(255) NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-ALTER TABLE `SENTRY_DB_PRIVILEGE`
-  ADD CONSTRAINT `SENTRY_DB_PRIV_PK` PRIMARY KEY (`DB_PRIVILEGE_ID`);
-
-ALTER TABLE `SENTRY_ROLE`
-  ADD CONSTRAINT `SENTRY_ROLE_PK` PRIMARY KEY (`ROLE_ID`);
-
-ALTER TABLE `SENTRY_GROUP`
-  ADD CONSTRAINT `SENTRY_GROUP_PK` PRIMARY KEY (`GROUP_ID`);
-
-ALTER TABLE `SENTRY_VERSION`
-  ADD CONSTRAINT `SENTRY_VERSION` PRIMARY KEY (`VER_ID`);
-
-ALTER TABLE `SENTRY_DB_PRIVILEGE`
-  ADD UNIQUE `SENTRY_DB_PRIV_PRIV_NAME_UNIQ` (`SERVER_NAME`,`DB_NAME`,`TABLE_NAME`,`COLUMN_NAME`,`URI`(250),`ACTION`,`WITH_GRANT_OPTION`);
-
-ALTER TABLE `SENTRY_DB_PRIVILEGE`
-  ADD INDEX `SENTRY_PRIV_SERV_IDX` (`SERVER_NAME`);
-
-ALTER TABLE `SENTRY_DB_PRIVILEGE`
-  ADD INDEX `SENTRY_PRIV_DB_IDX` (`DB_NAME`);
-
-ALTER TABLE `SENTRY_DB_PRIVILEGE`
-  ADD INDEX `SENTRY_PRIV_TBL_IDX` (`TABLE_NAME`);
-
-ALTER TABLE `SENTRY_DB_PRIVILEGE`
-  ADD INDEX `SENTRY_PRIV_COL_IDX` (`COLUMN_NAME`);
-
-ALTER TABLE `SENTRY_DB_PRIVILEGE`
-  ADD INDEX `SENTRY_PRIV_URI_IDX` (`URI`);
-
-ALTER TABLE `SENTRY_ROLE`
-  ADD CONSTRAINT `SENTRY_ROLE_ROLE_NAME_UNIQUE` UNIQUE (`ROLE_NAME`);
-
-ALTER TABLE `SENTRY_GROUP`
-  ADD CONSTRAINT `SENTRY_GRP_GRP_NAME_UNIQUE` UNIQUE (`GROUP_NAME`);
-
-ALTER TABLE `SENTRY_ROLE_DB_PRIVILEGE_MAP`
-  ADD CONSTRAINT `SENTRY_ROLE_DB_PRIVILEGE_MAP_PK` PRIMARY KEY (`ROLE_ID`,`DB_PRIVILEGE_ID`);
-
-ALTER TABLE `SENTRY_ROLE_GROUP_MAP`
-  ADD CONSTRAINT `SENTRY_ROLE_GROUP_MAP_PK` PRIMARY KEY (`ROLE_ID`,`GROUP_ID`);
-
-ALTER TABLE `SENTRY_ROLE_DB_PRIVILEGE_MAP`
-  ADD CONSTRAINT `SEN_RLE_DB_PRV_MAP_SN_RLE_FK`
-  FOREIGN KEY (`ROLE_ID`) REFERENCES `SENTRY_ROLE`(`ROLE_ID`);
-
-ALTER TABLE `SENTRY_ROLE_DB_PRIVILEGE_MAP`
-  ADD CONSTRAINT `SEN_RL_DB_PRV_MAP_SN_DB_PRV_FK`
-  FOREIGN KEY (`DB_PRIVILEGE_ID`) REFERENCES `SENTRY_DB_PRIVILEGE`(`DB_PRIVILEGE_ID`);
-
-ALTER TABLE `SENTRY_ROLE_GROUP_MAP`
-  ADD CONSTRAINT `SEN_ROLE_GROUP_MAP_SEN_ROLE_FK`
-  FOREIGN KEY (`ROLE_ID`) REFERENCES `SENTRY_ROLE`(`ROLE_ID`);
-
-ALTER TABLE `SENTRY_ROLE_GROUP_MAP`
-  ADD CONSTRAINT `SEN_ROLE_GROUP_MAP_SEN_GRP_FK`
-  FOREIGN KEY (`GROUP_ID`) REFERENCES `SENTRY_GROUP`(`GROUP_ID`);
-
-INSERT INTO SENTRY_VERSION (VER_ID, SCHEMA_VERSION, VERSION_COMMENT) VALUES (1, '1.8.0', 'Sentry release version 1.8.0');
-
--- Generic Model
--- Table SENTRY_GM_PRIVILEGE for classes [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
-CREATE TABLE `SENTRY_GM_PRIVILEGE`
-(
-    `GM_PRIVILEGE_ID` BIGINT NOT NULL,
-    `ACTION` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-    `COMPONENT_NAME` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-    `CREATE_TIME` BIGINT NOT NULL,
-    `WITH_GRANT_OPTION` CHAR(1) NOT NULL,
-    `RESOURCE_NAME_0` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-    `RESOURCE_NAME_1` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-    `RESOURCE_NAME_2` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-    `RESOURCE_NAME_3` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-    `RESOURCE_TYPE_0` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-    `RESOURCE_TYPE_1` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-    `RESOURCE_TYPE_2` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-    `RESOURCE_TYPE_3` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '__NULL__',
-    `SCOPE` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-    `SERVICE_NAME` VARCHAR(64) BINARY CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-ALTER TABLE `SENTRY_GM_PRIVILEGE`
-  ADD CONSTRAINT `SENTRY_GM_PRIVILEGE_PK` PRIMARY KEY (`GM_PRIVILEGE_ID`);
--- Constraints for table SENTRY_GM_PRIVILEGE for class(es) [org.apache.sentry.provider.db.service.model.MSentryGMPrivilege]
-ALTER TABLE `SENTRY_GM_PRIVILEGE`
-  ADD UNIQUE `GM_PRIVILEGE_UNIQUE` (`COMPONENT_NAME`,`SERVICE_NAME`,`RESOURCE_NAME_0`,`RESOURCE_TYPE_0`,`RESOURCE_NAME_1`,`RESOURCE_TYPE_1`,`RESOURCE_NAME_2`,`RESOURCE_TYPE_2`,`RESOURCE_NAME_3`,`RESOURCE_TYPE_3`,`ACTION`,`WITH_GRANT_OPTION`);
-
-ALTER TABLE `SENTRY_GM_PRIVILEGE`
-  ADD INDEX `SENTRY_GM_PRIV_COMP_IDX` (`COMPONENT_NAME`);
-
-ALTER TABLE `SENTRY_GM_PRIVILEGE`
-  ADD INDEX `SENTRY_GM_PRIV_SERV_IDX` (`SERVICE_NAME`);
-
-ALTER TABLE `SENTRY_GM_PRIVILEGE`
-  ADD INDEX `SENTRY_GM_PRIV_RES0_IDX` (`RESOURCE_NAME_0`,`RESOURCE_TYPE_0`);
-
-ALTER TABLE `SENTRY_GM_PRIVILEGE`
-  ADD INDEX `SENTRY_GM_PRIV_RES1_IDX` (`RESOURCE_NAME_1`,`RESOURCE_TYPE_1`);
-
-ALTER TABLE `SENTRY_GM_PRIVILEGE`
-  ADD INDEX `SENTRY_GM_PRIV_RES2_IDX` (`RESOURCE_NAME_2`,`RESOURCE_TYPE_2`);
-
-ALTER TABLE `SENTRY_GM_PRIVILEGE`
-  ADD INDEX `SENTRY_GM_PRIV_RES3_IDX` (`RESOURCE_NAME_3`,`RESOURCE_TYPE_3`);
-
--- Table SENTRY_ROLE_GM_PRIVILEGE_MAP for join relationship
-CREATE TABLE `SENTRY_ROLE_GM_PRIVILEGE_MAP`
-(
-    `ROLE_ID` BIGINT NOT NULL,
-    `GM_PRIVILEGE_ID` BIGINT NOT NULL
-) ENGINE=INNODB DEFAULT CHARSET=utf8;
-
-ALTER TABLE `SENTRY_ROLE_GM_PRIVILEGE_MAP`
-  ADD CONSTRAINT `SENTRY_ROLE_GM_PRIVILEGE_MAP_PK` PRIMARY KEY (`ROLE_ID`,`GM_PRIVILEGE_ID`);
-
--- Constraints for table SENTRY_ROLE_GM_PRIVILEGE_MAP
-ALTER TABLE `SENTRY_ROLE_GM_PRIVILEGE_MAP`
-  ADD CONSTRAINT `SEN_RLE_GM_PRV_MAP_SN_RLE_FK`
-  FOREIGN KEY (`ROLE_ID`) REFERENCES `SENTRY_ROLE`(`ROLE_ID`);
-
-ALTER TABLE `SENTRY_ROLE_GM_PRIVILEGE_MAP`
-  ADD CONSTRAINT `SEN_RL_GM_PRV_MAP_SN_DB_PRV_FK`
-  FOREIGN KEY (`GM_PRIVILEGE_ID`) REFERENCES `SENTRY_GM_PRIVILEGE`(`GM_PRIVILEGE_ID`);
-
-CREATE TABLE `SENTRY_USER` (
-	  `USER_ID` BIGINT  NOT NULL,
-	  `USER_NAME` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-	  `CREATE_TIME` BIGINT NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-ALTER TABLE `SENTRY_USER`
-	 ADD CONSTRAINT `SENTRY_USER_PK` PRIMARY KEY (`USER_ID`);
-
-ALTER TABLE `SENTRY_USER`
-	 ADD CONSTRAINT `SENTRY_USER_USER_NAME_UNIQUE` UNIQUE (`USER_NAME`);
-
-CREATE TABLE `SENTRY_ROLE_USER_MAP` (
-	  `ROLE_ID` BIGINT NOT NULL,
-	  `USER_ID` BIGINT NOT NULL,
-	  `GRANTOR_PRINCIPAL` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-ALTER TABLE `SENTRY_ROLE_USER_MAP`
-	ADD CONSTRAINT `SENTRY_ROLE_USER_MAP_PK` PRIMARY KEY (`ROLE_ID`,`USER_ID`);
-
-ALTER TABLE `SENTRY_ROLE_USER_MAP`
-	ADD CONSTRAINT `SEN_ROLE_USER_MAP_SEN_ROLE_FK`
-	FOREIGN KEY (`ROLE_ID`) REFERENCES `SENTRY_ROLE`(`ROLE_ID`);
-
-ALTER TABLE `SENTRY_ROLE_USER_MAP`
-	 ADD CONSTRAINT `SEN_ROLE_USER_MAP_SEN_USER_FK`
-	 FOREIGN KEY (`USER_ID`) REFERENCES `SENTRY_USER`(`USER_ID`);
-
--- Table AUTHZ_PATHS_SNAPSHOT_ID for class [org.apache.sentry.provider.db.service.model.MAuthzPathsSnapshotId]
-CREATE TABLE `AUTHZ_PATHS_SNAPSHOT_ID`
-(
-    `AUTHZ_SNAPSHOT_ID` BIGINT NOT NULL,
-    CONSTRAINT `AUTHZ_SNAPSHOT_ID_PK` PRIMARY KEY (`AUTHZ_SNAPSHOT_ID`)
-)ENGINE=INNODB;
-
--- Table `AUTHZ_PATHS_MAPPING` for classes [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
-CREATE TABLE `AUTHZ_PATHS_MAPPING`
-(
-    `AUTHZ_OBJ_ID` BIGINT NOT NULL AUTO_INCREMENT,
-    `AUTHZ_OBJ_NAME` VARCHAR(384) BINARY NULL,
-    `CREATE_TIME_MS` BIGINT NOT NULL,
-    `AUTHZ_SNAPSHOT_ID` BIGINT NOT NULL,
-    CONSTRAINT `AUTHZ_PATHS_MAPPING_PK` PRIMARY KEY (`AUTHZ_OBJ_ID`)
-) ENGINE=INNODB;
-
--- Constraints for table `AUTHZ_PATHS_MAPPING` for class(es) [org.apache.sentry.provider.db.service.model.MAuthzPathsMapping]
-CREATE UNIQUE INDEX `AUTHZOBJNAME` ON `AUTHZ_PATHS_MAPPING` (`AUTHZ_OBJ_NAME`);
-
--- Table `AUTHZ_PATH` for classes [org.apache.sentry.provider.db.service.model.MPath]
-CREATE TABLE `AUTHZ_PATH` (
-    `PATH_ID` BIGINT NOT NULL,
-    `PATH_NAME` VARCHAR(4000) CHARACTER SET utf8 COLLATE utf8_bin,
-    `AUTHZ_OBJ_ID` BIGINT
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
--- Constraints for table `AUTHZ_PATH`
-ALTER TABLE `AUTHZ_PATH`
-  ADD CONSTRAINT `AUTHZ_PATH_PK` PRIMARY KEY (`PATH_ID`);
-
-ALTER TABLE `AUTHZ_PATH`
-  ADD CONSTRAINT `AUTHZ_PATH_FK`
-  FOREIGN KEY (`AUTHZ_OBJ_ID`) REFERENCES `AUTHZ_PATHS_MAPPING`(`AUTHZ_OBJ_ID`);
-
--- Table `SENTRY_PERM_CHANGE` for classes [org.apache.sentry.provider.db.service.model.MSentryPermChange]
-CREATE TABLE `SENTRY_PERM_CHANGE`
-(
-    `CHANGE_ID` BIGINT NOT NULL,
-    `CREATE_TIME_MS` BIGINT NOT NULL,
-    `PERM_CHANGE` VARCHAR(4000) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-    CONSTRAINT `SENTRY_PERM_CHANGE_PK` PRIMARY KEY (`CHANGE_ID`)
-) ENGINE=INNODB;
-
--- Table `SENTRY_PATH_CHANGE` for classes [org.apache.sentry.provider.db.service.model.MSentryPathChange]
-CREATE TABLE `SENTRY_PATH_CHANGE`
-(
-    `CHANGE_ID` BIGINT NOT NULL,
-    `NOTIFICATION_ID` BIGINT NOT NULL,
-    `CREATE_TIME_MS` BIGINT NOT NULL,
-    `PATH_CHANGE` VARCHAR(4000) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
-    CONSTRAINT `SENTRY_PATH_CHANGE_PK` PRIMARY KEY (`CHANGE_ID`)
-) ENGINE=INNODB;
-
--- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
-CREATE UNIQUE INDEX `NOTIFICATIONID` ON `SENTRY_PATH_CHANGE` (`NOTIFICATION_ID`);
-
--- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
-CREATE TABLE `SENTRY_HMS_NOTIFICATION_ID`
-(
-    `NOTIFICATION_ID` BIGINT NOT NULL,
-    CONSTRAINT `SENTRY_NOTIFICATION_PK` PRIMARY KEY (`NOTIFICATION_ID`)
-)ENGINE=INNODB;


Mime
View raw message