package org.sonar.server.db.migrations.v51;
import org.sonar.core.persistence.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
+import org.sonar.server.db.migrations.*;
import org.sonar.server.db.migrations.MassUpdate.Handler;
import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.SqlStatement;
import javax.annotation.Nullable;
/**
* SONAR-6054
+ * SONAR-6119
*/
public class UpdateProjectsModuleUuidPath extends BaseDataChange {
@Override
public void execute(Context context) throws SQLException {
- MassUpdate update = context.prepareMassUpdate().rowPluralName("projects");
- update.select("SELECT p.id, p.module_uuid_path FROM projects p");
+ MassUpdate update = context.prepareMassUpdate().rowPluralName("components");
+ update.select("SELECT p.id, p.module_uuid_path, p.uuid, p.scope, p.qualifier FROM projects p");
update.update("UPDATE projects SET module_uuid_path=? WHERE id=?");
- update.execute(new Handler() {
- @Override
- public boolean handle(Row row, SqlStatement update) throws SQLException {
- Long id = row.getLong(1);
- String moduleUuidPath = row.getString(2);
- if (needUpdate(moduleUuidPath)) {
- update.setString(1, newModuleUuidPath(moduleUuidPath));
- update.setLong(2, id);
- return true;
- }
- return false;
- }
- });
+ update.execute(new ModuleUuidPathUpdateHandler());
}
- private static boolean needUpdate(@Nullable String moduleUuidPath) {
- return moduleUuidPath == null || !(moduleUuidPath.startsWith(SEP) && moduleUuidPath.endsWith(SEP));
- }
+ private static final class ModuleUuidPathUpdateHandler implements Handler {
+ @Override
+ public boolean handle(Row row, SqlStatement update) throws SQLException {
+ Long id = row.getLong(1);
+ String moduleUuidPath = row.getString(2);
+ String uuid = row.getString(3);
+ String scope = row.getString(4);
+ String qualifier = row.getString(5);
+
+ boolean needUpdate = false;
+ String newModuleUuidPath = moduleUuidPath;
+
+ if (needUpdateForSeparators(moduleUuidPath)) {
+ newModuleUuidPath = newModuleUuidPathWithSeparators(moduleUuidPath);
+ needUpdate = true;
+ }
+
+ if (needUpdateToIncludeItself(newModuleUuidPath, uuid, scope, qualifier)) {
+ newModuleUuidPath = newModuleUuidPathIncludingItself(newModuleUuidPath, uuid);
+ needUpdate = true;
+ }
+
+ if (needUpdate) {
+ update.setString(1, newModuleUuidPath);
+ update.setLong(2, id);
+ }
+ return needUpdate;
+ }
+
+ private static boolean needUpdateForSeparators(@Nullable String moduleUuidPath) {
+ return moduleUuidPath == null || !(moduleUuidPath.startsWith(SEP) && moduleUuidPath.endsWith(SEP));
+ }
- private static String newModuleUuidPath(@Nullable String oldModuleUuidPath) {
- if (oldModuleUuidPath == null || oldModuleUuidPath.isEmpty()) {
- return SEP;
- } else {
- StringBuilder newModuleUuidPath = new StringBuilder(oldModuleUuidPath);
- newModuleUuidPath.insert(0, SEP);
+ private static String newModuleUuidPathWithSeparators(@Nullable String oldModuleUuidPath) {
+ if (oldModuleUuidPath == null || oldModuleUuidPath.isEmpty()) {
+ return SEP;
+ } else {
+ StringBuilder newModuleUuidPath = new StringBuilder(oldModuleUuidPath);
+ newModuleUuidPath.insert(0, SEP);
+ newModuleUuidPath.append(SEP);
+ return newModuleUuidPath.toString();
+ }
+ }
+
+ private static boolean needUpdateToIncludeItself(String moduleUuidPath, @Nullable String uuid, @Nullable String scope, @Nullable String qualifier) {
+ return "PRJ".equals(scope) && !("DEV_PRJ".equals(qualifier)) && !(moduleUuidPath.contains(uuid));
+ }
+
+ private static String newModuleUuidPathIncludingItself(String moduleUuidPath, String uuid) {
+ StringBuilder newModuleUuidPath = new StringBuilder(moduleUuidPath);
+ newModuleUuidPath.append(uuid);
newModuleUuidPath.append(SEP);
return newModuleUuidPath.toString();
}
}
-
}
<!-- root project -->
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
- uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
+ uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- module -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" deprecated_kee="org.struts:struts-core"
- uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
+ uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
scope="PRJ" qualifier="BRC" long_name="Struts Core"
description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
- <!-- sub module -->
+ <!-- sub module, already has dots: only itself appended -->
<projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data" deprecated_kee="org.struts:struts-data"
- uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
+ uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH.FGHI."
scope="PRJ" qualifier="BRC" long_name="Struts Data"
description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+ <!-- view -->
+ <projects id="6" root_id="[null]" scope="PRJ" qualifier="VW" kee="Teams" name="Teams" deprecated_kee="Teams"
+ uuid="MEAT" project_uuid="MEAT" module_uuid="[null]" module_uuid_path=".MEAT."
+ description="the description" long_name="Teams"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- sub-view -->
+ <projects id="7" root_id="6" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+ uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path=".MEAT.PLAT."
+ description="the description" long_name="Platform Team"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- view technical project - unchanged -->
+ <projects id="8" root_id="6" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+ uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
+ description="the description" long_name="Platform Team"
+ enabled="[true]" language="[null]" copy_resource_id="42" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- root project already has dots, appending itself -->
+ <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path=".WDOT."
+ description="the description" long_name="Sample"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
<!-- root project with module_uuid_path NULL -->
<projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
- uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="."
+ uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path=".DCBA."
description="the description" long_name="Sample"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+ <!-- developer -->
+ <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+ uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=".VADR."
+ description="the description" long_name="Anakin Skywalker"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- developer technical project, with dots - unchanged -->
+ <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+ uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
+ description="the description" long_name="Executor Star Dreadnaught"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
</dataset>
description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
- <!-- sub module -->
+ <!-- sub module, already has dots: only itself appended -->
<projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data" deprecated_kee="org.struts:struts-data"
- uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path="ABCD.EFGH"
+ uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
scope="PRJ" qualifier="BRC" long_name="Struts Data"
description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+ <!-- view -->
+ <projects id="6" root_id="[null]" scope="PRJ" qualifier="VW" kee="Teams" name="Teams" deprecated_kee="Teams"
+ uuid="MEAT" project_uuid="MEAT" module_uuid="[null]" module_uuid_path=""
+ description="the description" long_name="Teams"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- sub-view -->
+ <projects id="7" root_id="6" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+ uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path="MEAT"
+ description="the description" long_name="Platform Team"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- view technical project, already has dots - unchanged -->
+ <projects id="8" root_id="6" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+ uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
+ description="the description" long_name="Platform Team"
+ enabled="[true]" language="[null]" copy_resource_id="42" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- root project already has dots, appending itself -->
+ <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path="."
+ description="the description" long_name="Sample"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
<!-- root project with module_uuid_path NULL -->
<projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="[null]"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+ <!-- developer -->
+ <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+ uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=""
+ description="the description" long_name="Anakin Skywalker"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- developer technical project, with dots - unchanged -->
+ <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+ uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
+ description="the description" long_name="Executor Star Dreadnaught"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
</dataset>
<!-- root project -->
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
- uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
+ uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- module -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" deprecated_kee="org.struts:struts-core"
- uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
+ uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
scope="PRJ" qualifier="BRC" long_name="Struts Core"
description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- sub module -->
<projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data" deprecated_kee="org.struts:struts-data"
- uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
+ uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH.FGHI."
scope="PRJ" qualifier="BRC" long_name="Struts Data"
description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+ <!-- view -->
+ <projects id="6" root_id="[null]" scope="PRJ" qualifier="VW" kee="Teams" name="Teams" deprecated_kee="Teams"
+ uuid="MEAT" project_uuid="MEAT" module_uuid="[null]" module_uuid_path=".MEAT."
+ description="the description" long_name="Teams"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- sub-view -->
+ <projects id="7" root_id="[null]" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+ uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path=".MEAT.PLAT."
+ description="the description" long_name="Platform Team"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- view technical project, already has dots - unchanged -->
+ <projects id="8" root_id="[null]" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+ uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
+ description="the description" long_name="Platform Team"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- root project already has dots, appending itself -->
+ <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path=".WDOT."
+ description="the description" long_name="Sample"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
<!-- root project with module_uuid_path NULL -->
<projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
- uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="."
+ uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path=".DCBA."
description="the description" long_name="Sample"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+ <!-- developer -->
+ <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+ uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=".VADR."
+ description="the description" long_name="Anakin Skywalker"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+ <!-- developer technical project, with dots - unchanged -->
+ <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+ uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
+ description="the description" long_name="Executor Star Dreadnaught"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
</dataset>
+++ /dev/null
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# SonarQube is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# SonarQube 5.1
-# SONAR-6054
-#
-class UpdateProjectsModuleUuidPath < ActiveRecord::Migration
-
- def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.UpdateProjectsModuleUuidPath')
- end
-end
--- /dev/null
+#
+# SonarQube, open source software quality management tool.
+# Copyright (C) 2008-2014 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# SonarQube is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# SonarQube is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+#
+# SonarQube 5.1
+# SONAR-6054
+# SONAR-6117
+#
+class UpdateProjectsModuleUuidPath < ActiveRecord::Migration
+
+ def self.up
+ execute_java_migration('org.sonar.server.db.migrations.v51.UpdateProjectsModuleUuidPath')
+ end
+end
*/
public class DatabaseVersion implements BatchComponent, ServerComponent {
- public static final int LAST_VERSION = 789;
+ public static final int LAST_VERSION = 790;
/**
* List of all the tables.n
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('764');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('765');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('766');
-INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('767');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('768');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('769');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('770');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('787');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('788');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('789');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('790');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '1418215735482', '1418215735482', null, null);
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;