Repository: jhipster/generator-jhipster
Pull request #9259 (2019-02-14 00:34:12)

Update dependencies
-   Please make sure the below checklist is followed for Pull Requests.

-   [x] [Travis tests](https://travis-ci.org/jhipster/generator-jhipster/pull_requests) are green
-   [x] Tests are added where necessary
-   [x] Documentation is added/updated where necessary
-   [x] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md) are followed

<!--
Please also reference the issue number in a commit message to [automatically close the related Github issue](https://help.github.com/articles/closing-issues-via-commit-messages/)

Note: It is also possible to add `[skip ci]` to your commit message to skip Travis tests
-->



Patch:
diff --git a/.prettierignore b/.prettierignore
index adacca64d4..2f01b6af9e 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,7 +1,6 @@
 node_modules
 travis
 docs
-.git
 .jhipster
 .vscode
 **/templates/**/
diff --git a/generators/common/templates/.prettierignore.ejs b/generators/common/templates/.prettierignore.ejs
index 91b1ba356d..151fcf7916 100644
--- a/generators/common/templates/.prettierignore.ejs
+++ b/generators/common/templates/.prettierignore.ejs
@@ -1,4 +1,3 @@
 node_modules
 target
 package-lock.json
-.git
diff --git a/generators/entity-server/files.js b/generators/entity-server/files.js
index f36dee6b47..e214ab01ef 100644
--- a/generators/entity-server/files.js
+++ b/generators/entity-server/files.js
@@ -19,7 +19,6 @@
 const _ = require('lodash');
 const randexp = require('randexp');
 const chalk = require('chalk');
-const faker = require('faker');
 const fs = require('fs');
 const utils = require('../utils');
 const constants = require('../generator-constants');
@@ -31,9 +30,6 @@ const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
 const TEST_DIR = constants.TEST_DIR;
 const SERVER_TEST_SRC_DIR = constants.SERVER_TEST_SRC_DIR;
 
-// In order to have consistent results with Faker, the seed is fixed.
-faker.seed(42);
-
 /**
  * The default is to use a file path string. It implies use of the template method.
  * For any other config an object { file:.., method:.., template:.. } can be used
@@ -48,16 +44,6 @@ const serverFiles = {
                     file: 'config/liquibase/changelog/added_entity.xml',
                     options: { interpolate: INTERPOLATE_REGEX },
                     renameTo: generator => `config/liquibase/changelog/${generator.changelogDate}_added_entity_${generator.entityClass}.xml`
-                },
-                {
-                    file: 'config/liquibase/data/table.csv',
-                    options: {
-                        interpolate: INTERPOLATE_REGEX,
-                        context: {
-                            faker
-                        }
-                    },
-                    renameTo: generator => `config/liquibase/data/${generator.entityTableName}.csv`
                 }
             ]
         },
diff --git a/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs b/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
index 95209ed831..8b1ee90284 100644
--- a/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
+++ b/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
@@ -25,9 +25,9 @@
                         http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
 
     <property name="now" value="now()" dbms="h2"/>
-    <% let autoIncrementValue = true;
+    <% let autoIncrementValue = true; 
         for (idx in relationships) {
-            if (relationships[idx].useJPADerivedIdentifier === true) {
+            if (relationships[idx].useJPADerivedIdentifier === true) { 
                 autoIncrementValue = false;
                 break;
             }
@@ -120,17 +120,12 @@
                 <constraints nullable="<%= nullable %>" />
                 <%_ } _%>
             </column>
-                <%_ if (fieldType === 'byte[]' && fieldTypeBlobContent !== 'text') {
-                    columnType = "varchar(255)"; _%>
-            <column name="<%=columnName %>_content_type" type="<%=columnType %>">
+            <%_ if (fieldType === 'byte[]' && fieldTypeBlobContent !== 'text') { _%>
+            <column name="<%=columnName %>_content_type" type="varchar(255)">
                 <constraints nullable="<%= nullable %>" />
             </column>
-                <%_ } _%>
-            <%_
-            fields[idx].columnType = columnType;
-            _%>
-            <%_ } _%>
-            <%_ for (idx in relationships) {
+            <%_ }  _%>
+            <%_ } _%><% for (idx in relationships) {
                 let nullable_relation = true,
                 relationshipType = relationships[idx].relationshipType,
                 relationshipName = relationships[idx].relationshipName,
@@ -138,13 +133,12 @@
                 if (relationships[idx].relationshipValidate === true && relationships[idx].relationshipRequired) {
                     nullable_relation = false;
                 }
-                if (relationships[idx].relationshipType === 'many-to-one') { _%>
-
+                if (relationships[idx].relationshipType === 'many-to-one') { %>
             <column name="<%=getColumnName(relationshipName) %>_id" type="<%= relationshipColumnType %>">
                 <constraints nullable="<%= nullable_relation %>" />
             </column>
-            <%_ } else if (relationshipType === 'one-to-one' && relationships[idx].ownerSide === true
-                            && (relationships[idx].useJPADerivedIdentifier == null || relationships[idx].useJPADerivedIdentifier === false)) {
+            <%_ } else if (relationshipType === 'one-to-one' && relationships[idx].ownerSide === true 
+                            && (relationships[idx].useJPADerivedIdentifier == null || relationships[idx].useJPADerivedIdentifier === false)) { 
                 const uniqueConstraintName = getUXConstraintName(entityTableName, getColumnName(relationshipName) + '_id', prodDatabaseType);
             _%>
             <column name="<%=getColumnName(relationshipName) %>_id" type="<%= relationshipColumnType %>">
@@ -152,54 +146,12 @@
             </column><% } %><% } %>
             <!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
         </createTable>
-
         <%_ for (const idx in fields) {
             if (fields[idx].fieldType === 'ZonedDateTime' || fields[idx].fieldType === 'Instant') { _%>
         <dropDefaultValue tableName="<%= entityTableName %>" columnName="<%=fields[idx].fieldNameAsDatabaseColumn %>" columnDataType="datetime"/>
         <%_ }
         } _%>
-    </changeSet>
-
-    <!--
-        Load sample data generated with Faker.js
-        - This data can be easily edited using a CSV editor (or even MS Excel) and
-          is located in the 'src/main/resources/config/liquibase/data' directory
-        - By default this data is applied when running with the JHipster 'dev' profile.
-          This can be customized by adding or removing 'faker' in the 'spring.liquibase.contexts'
-          Spring Boot configuration key.
-    -->
-    <changeSet id="<%= changelogDate %>-1-data" author="jhipster" context="faker">
-        <loadData
-                  file="config/liquibase/data/<%= entityTableName %>.csv"
-                  separator=";"
-                  tableName="<%= entityTableName %>"
-                  context="dev">
-            <column name="id" type="numeric"/>
-            <%_ for (idx in fields) {
-                let loadColumnType = 'string';
-                let columnType = fields[idx].columnType;
-                if (columnType === 'integer' || columnType === 'bigint' || columnType === 'double' || columnType === 'decimal(10,2)' || columnType === '${floatType}') {
-                    loadColumnType = 'numeric';
-                } else if (columnType === 'date' || columnType === 'datetime') {
-                    loadColumnType = 'date';
-                } else if (columnType === 'boolean') {
-                    loadColumnType = 'boolean';
-                } else if (fields[idx].fieldIsEnum) {
-                    loadColumnType = 'string';
-                } else if (columnType === 'clob' || columnType === 'blob' || columnType === 'longblob') {
-                    loadColumnType = 'string';
-                }
-                _%>
-            <column name="<%=fields[idx].fieldNameAsDatabaseColumn%>" type="<%=loadColumnType%>"/>
-                <%_ if (fields[idx].fieldType === 'byte[]' && fields[idx].fieldTypeBlobContent !== 'text') { _%>
-            <column name="<%=fields[idx].fieldNameAsDatabaseColumn%>_content_type" type="string"/>
-                <%_ } _%>
-            <%_ } _%>
-        </loadData>
-    </changeSet>
-
-    <changeSet id="<%= changelogDate %>-1-relations" author="jhipster">
-        <%_ for (idx in relationships) {
+        <% for (idx in relationships) {
             const relationshipType = relationships[idx].relationshipType,
             relationshipName = relationships[idx].relationshipName,
             ownerSide = relationships[idx].ownerSide,
diff --git a/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity_constraints.xml.ejs b/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity_constraints.xml.ejs
index 52dc1c82b0..7e521b7a08 100644
--- a/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity_constraints.xml.ejs
+++ b/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity_constraints.xml.ejs
@@ -52,7 +52,6 @@
                                  constraintName="<%= constraintName %>"
                                  referencedColumnNames="id"
                                  referencedTableName="<%= entityTableName %>"/>
-
         <addForeignKeyConstraint baseColumnNames="<%= getColumnName(relationshipName) %>_id"
                                  baseTableName="<%= joinTableName %>"
                                  constraintName="<%= getColumnName(otherEntityConstraintName) %>"
diff --git a/generators/entity-server/templates/src/main/resources/config/liquibase/data/table.csv.ejs b/generators/entity-server/templates/src/main/resources/config/liquibase/data/table.csv.ejs
deleted file mode 100644
index 4ab84aa160..0000000000
--- a/generators/entity-server/templates/src/main/resources/config/liquibase/data/table.csv.ejs
+++ /dev/null
@@ -1,141 +0,0 @@
-<%#
- Copyright 2013-2019 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see https://www.jhipster.tech/
- for more information.
-
- Licensed 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.
--%>
-<%_
-let table = [];
-
-// Generate CSV header
-let header = [];
-header.push('id');
-for (idx in fields) {
-    header.push(fields[idx].fieldNameAsDatabaseColumn);
-    if (fields[idx].fieldType === 'byte[]' && fields[idx].fieldTypeBlobContent !== 'text') {
-        header.push(fields[idx].fieldNameAsDatabaseColumn + '_content_type');
-    }
-}
-for (idx in relationships) {
-    if (relationships[idx].relationshipValidate === true && relationships[idx].relationshipRequired) {
-        header.push(getColumnName(relationships[idx].relationshipName) + '_id');
-    }
-}
-table.push(header);
-
-// Generate CSV rows
-
-for (lineNb = 1; lineNb <= 10; lineNb++) {
-    let line = [ lineNb ];
-    for (idx in fields) {
-        let data = '';
-        let columnType = fields[idx].columnType;
-        let fieldType = fields[idx].fieldType;
-        if (columnType === 'integer'
-            || columnType === 'bigint'
-            || columnType === 'double'
-            || columnType.startsWith('decimal')) {
-            data = this.faker.random.number();
-        } else if (columnType === '${floatType}') {
-            data = this.faker.random.number();
-        } else if (columnType === 'boolean') {
-            data = this.faker.random.boolean();
-        } else if (columnType === 'date' || columnType === 'datetime') {
-            // Write the date without milliseconds so Java can parse it
-            // See https://stackoverflow.com/a/34053802/150868
-            data = this.faker.date.recent().toISOString().split('.')[0];
-        } else if (columnType.startsWith('varchar')) {
-            let columnName = fields[idx].fieldNameAsDatabaseColumn;
-            if (columnName === 'first_name') {
-                data = this.faker.name.firstName();
-            } else if (columnName === 'last_name') {
-                data = this.faker.name.lastName();
-            } else if (columnName === 'job_title') {
-                data = this.faker.name.jobTitle();
-            } else if (columnName === 'telephone' || columnName === 'phone') {
-                data = this.faker.phone.phoneNumber();
-            } else if (columnName === 'zip_code' || columnName === 'post_code') {
-                data = this.faker.address.zipCode();
-            } else if (columnName === 'city') {
-                data = this.faker.address.city();
-            } else if (columnName === 'street_name' || columnName === 'street') {
-                data = this.faker.address.streetName();
-            } else if (columnName === 'country') {
-                data = this.faker.address.country();
-            } else if (columnName === 'country_code') {
-                data = this.faker.address.countryCode();
-            } else if (columnName === 'color') {
-                data = this.faker.commerce.color();
-            } else if (columnName === 'account') {
-                data = this.faker.commerce.account();
-            } else if (columnName === 'account_name') {
-                data = this.faker.finance.accountName();
-            } else if (columnName === 'currency_code') {
-                data = this.faker.finance.currencyCode();
-            } else if (columnName === 'currency_name') {
-                data = this.faker.finance.currencyName();
-            } else if (columnName === 'currency_symbol') {
-                data = this.faker.finance.currencySymbol();
-            } else if (columnName === 'iban') {
-                data = this.faker.finance.iban();
-            } else if (columnName === 'bic') {
-                data = this.faker.finance.bic();
-            } else if (columnName === 'email') {
-                data = this.faker.internet.email();
-            } else if (columnName === 'url') {
-                data = this.faker.internet.url();
-            } else {
-                data = this.faker.random.words();
-            }
-            // manage String max length
-            if (fields[idx].fieldValidate === true && fields[idx].fieldValidateRules.includes('maxlength')) {
-                let maxlength = fields[idx].fieldValidateRulesMaxlength;
-                data = data.substring(0, maxlength);
-            }
-        }
-        if (fields[idx].fieldIsEnum) {
-            if (fields[idx].fieldValues.length !== 0) {
-                const enums = fields[idx].fieldValues.split(',');
-                data = enums[0];
-            } else {
-                data = '';
-            }
-        }
-        if (fieldType === 'byte[]') {
-            data = Buffer.from(this.faker.random.words(), 'utf8').toString('hex');
-        }
-        line.push(data);
-        if (fieldType === 'byte[]' && fields[idx].fieldTypeBlobContent !== 'text') {
-            line.push('image/png');
-        }
-    }
-    for (idx in relationships) {
-        if (relationships[idx].relationshipValidate === true && relationships[idx].relationshipRequired) {
-            line.push(this.faker.random.number({min: 1, max: 10}));
-        }
-    }
-    table.push(line);
-}
-
-let result = table
-        .map(line =>
-            line.map(data => {
-                    return data;
-                })
-                .join(';')
-        )
-        .join('\n');
- _%>
-<%-result%>
diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index 95293443c0..5049b3a551 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -25,7 +25,7 @@ const DOCKER_MARIADB = 'mariadb:10.4.2';
 const DOCKER_POSTGRESQL = 'postgres:11.1';
 const DOCKER_MONGODB = 'mongo:4.0.6';
 const DOCKER_COUCHBASE = 'couchbase/server:6.0.1';
-const DOCKER_CASSANDRA = 'cassandra:3.11.4';
+const DOCKER_CASSANDRA = 'cassandra:3.11.3';
 const DOCKER_MSSQL = 'microsoft/mssql-server-linux:latest';
 const DOCKER_ORACLE = 'sath89/oracle-12c:latest';
 const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:3.11.3';
diff --git a/generators/server/files.js b/generators/server/files.js
index e11ff4513a..05cb8e65c2 100644
--- a/generators/server/files.js
+++ b/generators/server/files.js
@@ -1379,7 +1379,7 @@ const serverFiles = {
                     generator.applicationType !== 'microservice') ||
                 (!generator.skipUserManagement && generator.databaseType === 'sql'),
             path: SERVER_MAIN_RES_DIR,
-            templates: ['config/liquibase/data/user.csv']
+            templates: ['config/liquibase/users.csv']
         },
         {
             condition: generator =>
@@ -1389,7 +1389,7 @@ const serverFiles = {
                     generator.databaseType === 'sql') ||
                 (!generator.skipUserManagement && generator.databaseType === 'sql'),
             path: SERVER_MAIN_RES_DIR,
-            templates: ['config/liquibase/data/authority.csv', 'config/liquibase/data/user_authority.csv']
+            templates: ['config/liquibase/authorities.csv', 'config/liquibase/users_authorities.csv']
         },
         {
             condition: generator => generator.skipUserManagement && generator.authenticationType === 'oauth2',
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs
index 822619931f..40b5a94a33 100644
--- a/generators/server/templates/build.gradle.ejs
+++ b/generators/server/templates/build.gradle.ejs
@@ -47,9 +47,9 @@ plugins {
     id "com.moowork.node" version "1.2.0"
     <%_ } _%>
     id "io.spring.dependency-management" version "1.0.6.RELEASE"
-    id "net.ltgt.apt-eclipse" version "0.20"
-    id "net.ltgt.apt-idea" version "0.20"
-    id "net.ltgt.apt" version "0.20"
+    id "net.ltgt.apt-eclipse" version "0.21"
+    id "net.ltgt.apt-idea" version "0.21"
+    id "net.ltgt.apt" version "0.21"
     <%_ if (databaseType === 'sql') { _%>
     id 'org.liquibase.gradle' version '2.0.1'
     <%_ } _%>
diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs
index ff0d05c4fb..7e68c6e840 100644
--- a/generators/server/templates/pom.xml.ejs
+++ b/generators/server/templates/pom.xml.ejs
@@ -107,7 +107,7 @@
         <jaxb-impl.version>2.3.2</jaxb-impl.version>
         <!-- The liquibase version should match the one managed by
         https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/${spring-boot.version} -->
-        <liquibase.version>3.6.2</liquibase.version>
+        <liquibase.version>3.6.3</liquibase.version>
         <liquibase-hibernate5.version>3.6</liquibase-hibernate5.version>
         <%_ } _%>
         <validation-api.version>2.0.1.Final</validation-api.version>
diff --git a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
index a28b149651..650fd61488 100644
--- a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
+++ b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
@@ -212,8 +212,7 @@ spring:
     <%_ } _%>
     <%_ if (databaseType === 'sql') { _%>
     liquibase:
-        # Remove 'faker' if you do not want the sample data to be loaded automatically
-        contexts: dev, faker
+        contexts: dev
     <%_ } _%>
     mail:
         host: localhost
diff --git a/generators/server/templates/src/main/resources/config/application-prod.yml.ejs b/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
index 83c36d3d9f..876feed516 100644
--- a/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
+++ b/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
@@ -181,7 +181,6 @@ spring:
             password: password
     <%_ } _%>
     <%_ if (databaseType === 'sql') { _%>
-    # Replace by 'prod, faker' to add the faker context and have sample data loaded in production
     liquibase:
         contexts: prod
     <%_ } _%>
diff --git a/generators/server/templates/src/main/resources/config/liquibase/changelog/initial_schema.xml.ejs b/generators/server/templates/src/main/resources/config/liquibase/changelog/initial_schema.xml.ejs
index ed1e1f3748..9490ba722f 100644
--- a/generators/server/templates/src/main/resources/config/liquibase/changelog/initial_schema.xml.ejs
+++ b/generators/server/templates/src/main/resources/config/liquibase/changelog/initial_schema.xml.ejs
@@ -29,7 +29,7 @@
     <%_ } _%>
     <%_ if (prodDatabaseType === 'postgresql' || prodDatabaseType === 'oracle' || prodDatabaseType === 'mssql') { _%>
     <changeSet id="00000000000000" author="jhipster">
-        <createSequence sequenceName="sequence_generator" startValue="1050" incrementBy="50"/>
+        <createSequence sequenceName="sequence_generator" startValue="1000" incrementBy="50"/>
     </changeSet>
     <%_ } _%>
 
@@ -140,8 +140,8 @@
                                  referencedTableName="<%= jhiTablePrefix %>_user"/>
     <%_ } _%>
     <%_ if (authenticationType !== 'oauth2' || (authenticationType === 'oauth2' && applicationType !== 'microservice')) { _%>
-        <<% if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { %>ext:<% } %>loadData
-                  file="config/liquibase/data/user.csv"
+        <<% if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { %>ext:<% } %>loadData encoding="UTF-8"
+                  file="config/liquibase/users.csv"
                   separator=";"
                   <%_ if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { _%>
                   identityInsertEnabled="true"
@@ -154,16 +154,16 @@
             <column name="created_date" type="timestamp"/>
         </<% if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { %>ext:<% } %>loadData>
         <dropDefaultValue tableName="<%= jhiTablePrefix %>_user" columnName="created_date" columnDataType="datetime"/>
-        <<% if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { %>ext:<% } %>loadData
-                  file="config/liquibase/data/authority.csv"
+        <<% if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { %>ext:<% } %>loadData encoding="UTF-8"
+                  file="config/liquibase/authorities.csv"
                   separator=";"
                   <%_ if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { _%>
                   identityInsertEnabled="true"
                   <%_ } _%>
                   tableName="<%= jhiTablePrefix %>_authority"/>
 
-        <<% if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { %>ext:<% } %>loadData
-                  file="config/liquibase/data/user_authority.csv"
+        <<% if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { %>ext:<% } %>loadData encoding="UTF-8"
+                  file="config/liquibase/users_authorities.csv"
                   separator=";"
                   <%_ if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { _%>
                   identityInsertEnabled="true"
diff --git a/generators/server/templates/src/main/resources/config/liquibase/data/authority.csv.ejs b/generators/server/templates/src/main/resources/config/liquibase/data/authority.csv.ejs
deleted file mode 100644
index af5c6dfa18..0000000000
--- a/generators/server/templates/src/main/resources/config/liquibase/data/authority.csv.ejs
+++ /dev/null
@@ -1,3 +0,0 @@
-name
-ROLE_ADMIN
-ROLE_USER
diff --git a/generators/server/templates/src/main/resources/config/liquibase/data/oauth_client_details.csv.ejs b/generators/server/templates/src/main/resources/config/liquibase/data/oauth_client_details.csv.ejs
deleted file mode 100644
index ad3d52d67b..0000000000
--- a/generators/server/templates/src/main/resources/config/liquibase/data/oauth_client_details.csv.ejs
+++ /dev/null
@@ -1,2 +0,0 @@
-client_id;resource_ids;client_secret;scope;authorized_grant_types;web_server_redirect_uri;authorities;access_token_validity;refresh_token_validity;additional_information;autoapprove
-<%= baseName %>app;res_<%= baseName %>;bXktc2VjcmV0LXRva2VuLXRvLWNoYW5nZS1pbi1wcm9kdWN0aW9uLWFuZC10by1rZWVwLWluLWEtc2VjdXJlLXBsYWNl;read,write;password,refresh_token,authorization_code,implicit;;ROLE_ADMIN,ROLE_USER;1800;2000;{};true
diff --git a/generators/server/templates/src/main/resources/config/liquibase/data/user.csv.ejs b/generators/server/templates/src/main/resources/config/liquibase/data/user.csv.ejs
deleted file mode 100644
index 590a55c9cf..0000000000
--- a/generators/server/templates/src/main/resources/config/liquibase/data/user.csv.ejs
+++ /dev/null
@@ -1,7 +0,0 @@
-id;login;<% if (authenticationType !== 'oauth2') { %>password_hash;<% } %>first_name;last_name;email;image_url;activated;lang_key;created_by;last_modified_by
-1;system;<% if (authenticationType !== 'oauth2') { %>$2a$10$mE.qmcV0mFU5NcKh73TZx.z4ueI/.bDWbj0T1BYyqP481kGGarKLG;<% } %>System;System;system@localhost;;true;<%= nativeLanguage %>;system;system
-2;anonymoususer;<% if (authenticationType !== 'oauth2') { %>$2a$10$j8S5d7Sr7.8VTOYNviDPOeWX8KcYILUVJBsYV83Y5NtECayypx9lO;<% } %>Anonymous;User;anonymous@localhost;;true;<%= nativeLanguage %>;system;system
-<%_ if (authenticationType !== 'oauth2') { _%>
-3;admin;$2a$10$gSAhZrxMllrbgj/kkK9UceBPpChGWJA7SYIb1Mqo.n5aNLq1/oRrC;Administrator;Administrator;admin@localhost;;true;<%= nativeLanguage %>;system;system
-4;user;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;User;User;user@localhost;;true;<%= nativeLanguage %>;system;system
-<%_ } _%>
diff --git a/generators/server/templates/src/main/resources/config/liquibase/data/user_authority.csv.ejs b/generators/server/templates/src/main/resources/config/liquibase/data/user_authority.csv.ejs
deleted file mode 100644
index 7d17146cc5..0000000000
--- a/generators/server/templates/src/main/resources/config/liquibase/data/user_authority.csv.ejs
+++ /dev/null
@@ -1,8 +0,0 @@
-user_id;authority_name
-1;ROLE_ADMIN
-1;ROLE_USER
-<%_ if (authenticationType !== 'oauth2') { _%>
-3;ROLE_ADMIN
-3;ROLE_USER
-4;ROLE_USER
-<%_ } _%>
diff --git a/package-lock.json b/package-lock.json
index 208413ad1c..56cd1da6ed 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -769,6 +769,17 @@
             "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
             "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
         },
+        "concat-stream": {
+            "version": "1.6.2",
+            "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+            "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+            "requires": {
+                "buffer-from": "^1.0.0",
+                "inherits": "^2.0.3",
+                "readable-stream": "^2.2.2",
+                "typedarray": "^0.0.6"
+            }
+        },
         "conf": {
             "version": "2.0.0",
             "resolved": "https://registry.npmjs.org/conf/-/conf-2.0.0.tgz",
@@ -1730,11 +1741,6 @@
             "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
             "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
         },
-        "faker": {
-            "version": "4.1.0",
-            "resolved": "https://registry.npmjs.org/faker/-/faker-4.1.0.tgz",
-            "integrity": "sha1-HkW7vsxndLPBlfrSg1EJxtdIzD8="
-        },
         "fast-deep-equal": {
             "version": "2.0.1",
             "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
@@ -2052,13 +2058,6 @@
                 "timed-out": "^4.0.0",
                 "url-parse-lax": "^1.0.0",
                 "url-to-options": "^1.0.1"
-            },
-            "dependencies": {
-                "get-stream": {
-                    "version": "3.0.0",
-                    "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
-                    "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
-                }
             }
         },
         "graceful-fs": {
@@ -4224,19 +4223,6 @@
             "requires": {
                 "concat-stream": "^1.4.7",
                 "os-shim": "^0.1.2"
-            },
-            "dependencies": {
-                "concat-stream": {
-                    "version": "1.6.2",
-                    "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
-                    "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
-                    "requires": {
-                        "buffer-from": "^1.0.0",
-                        "inherits": "^2.0.3",
-                        "readable-stream": "^2.2.2",
-                        "typedarray": "^0.0.6"
-                    }
-                }
             }
         },
         "spdx-correct": {
diff --git a/package.json b/package.json
index 11ff0c967e..4a56c89503 100644
--- a/package.json
+++ b/package.json
@@ -56,7 +56,6 @@
         "conf": "2.0.0",
         "didyoumean": "1.2.1",
         "ejs": "2.6.1",
-        "faker": "4.1.0",
         "glob": "7.1.2",
         "gulp-filter": "5.1.0",
         "insight": "0.10.1",


Test patch:
diff --git a/test/utils/expected-files.js b/test/utils/expected-files.js
index 2003150d47..5448fbc527 100644
--- a/test/utils/expected-files.js
+++ b/test/utils/expected-files.js
@@ -209,9 +209,9 @@ const expectedFiles = {
     ],
 
     userManagementServer: [
-        `${SERVER_MAIN_RES_DIR}config/liquibase/data/authority.csv`,
-        `${SERVER_MAIN_RES_DIR}config/liquibase/data/user.csv`,
-        `${SERVER_MAIN_RES_DIR}config/liquibase/data/user_authority.csv`,
+        `${SERVER_MAIN_RES_DIR}config/liquibase/authorities.csv`,
+        `${SERVER_MAIN_RES_DIR}config/liquibase/users.csv`,
+        `${SERVER_MAIN_RES_DIR}config/liquibase/users_authorities.csv`,
         `${SERVER_MAIN_RES_DIR}templates/mail/activationEmail.html`,
         `${SERVER_MAIN_RES_DIR}templates/mail/passwordResetEmail.html`,
         `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/domain/Authority.java`,