Browse Source

search_text: system-data.sql

pull/8640/head
nickAS21 3 years ago
parent
commit
7076c1719f
  1. 2
      application/src/main/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeService.java
  2. 5
      dao/src/test/resources/sql/system-data.sql

2
application/src/main/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeService.java

@ -737,7 +737,7 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService
try {
String [] entityNames = new String [] {"device", "component_descriptor", "customer", "dashboard", "rule_chain", "rule_node", "asset_profile", "asset", "device_profile", "tb_user", "tenant_profile", "tenant", "widgets_bundle", "entity_view", "edge"};
for (String entityName : entityNames) {
conn.createStatement().execute("ALTER TABLE " + entityName + " DROP COLUMN search_text CASCADE");
conn.createStatement().execute("ALTER TABLE " + entityName + " DROP COLUMN " + SEARCH_TEXT + " CASCADE");
}
} catch (Exception e) {}

5
dao/src/test/resources/sql/system-data.sql

@ -17,9 +17,8 @@
/** SYSTEM **/
/** System admin **/
INSERT INTO tb_user ( id, created_time, tenant_id, customer_id, email, search_text, authority )
VALUES ( '5a797660-4612-11e7-a919-92ebcb67fe33', 1592576748000, '13814000-1dd2-11b2-8080-808080808080', '13814000-1dd2-11b2-8080-808080808080', 'sysadmin@thingsboard.org',
'sysadmin@thingsboard.org', 'SYS_ADMIN' );
INSERT INTO tb_user ( id, created_time, tenant_id, customer_id, email, authority )
VALUES ( '5a797660-4612-11e7-a919-92ebcb67fe33', 1592576748000, '13814000-1dd2-11b2-8080-808080808080', '13814000-1dd2-11b2-8080-808080808080', 'sysadmin@thingsboard.org', 'SYS_ADMIN' );
INSERT INTO user_credentials ( id, created_time, user_id, enabled, password )
VALUES ( '61441950-4612-11e7-a919-92ebcb67fe33', 1592576748000, '5a797660-4612-11e7-a919-92ebcb67fe33', true,

Loading…
Cancel
Save