<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>My fault,</p>
    <p><br>
    </p>
    <p>before i have to compile opensips 3.2 and then:</p>
    <pre class="western" style="font-style: normal; text-align: justify"><font face="Times New Roman, serif"><font style="font-size: 12pt" size="3"><b>opensips-cli -x database migrate 3.1_to_3.2 opensips opensips_3_2</b>

where opensips is my old opensips database and opensips_3_2 is the new opensips database create by <b>opensips-cli database migrate</b> command

Thank you
</font></font></pre>
    <p></p>
    <pre class="moz-signature" cols="72">---
I'm SoCIaL, MayBe</pre>
    <div class="moz-cite-prefix">El 11/02/2023 a las 10:49 a. m., Joseph
      Jackson escribió:<br>
    </div>
    <blockquote type="cite"
cite="mid:CY8PR17MB62605362E088FBD13A786F27DBDF9@CY8PR17MB6260.namprd17.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
        255, 255);" class="elementToProof">
        <br>
      </div>
      <div class="elementToProof" style="font-family: Calibri, Arial,
        Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
        background-color: rgb(255, 255, 255);">
        Hi,</div>
      <div class="elementToProof" style="font-family: Calibri, Arial,
        Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
        background-color: rgb(255, 255, 255);">
        <br>
      </div>
      <div class="elementToProof" style="font-family: Calibri, Arial,
        Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
        background-color: rgb(255, 255, 255);">
        You need to download the scripts and then define the path.</div>
      <div class="elementToProof" style="font-family: Calibri, Arial,
        Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
        background-color: rgb(255, 255, 255);">
        <br>
      </div>
      <div class="elementToProof" style="font-family: Calibri, Arial,
        Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
        background-color: rgb(255, 255, 255);">
        Example -</div>
      <div class="elementToProof" style="font-family: Calibri, Arial,
        Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
        background-color: rgb(255, 255, 255);">
        <br>
      </div>
      <div class="elementToProof ContentPasted0" style="font-family:
        Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color:
        rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
        opensips-cli -o database_schema_path=~/src/opensips-3.2/scripts
        -x database migrate 3.1_to_3.2  opensips_mig_3_1
        opensips_mig_3_2</div>
      <div class="elementToProof ContentPasted0" style="font-family:
        Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color:
        rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
        <br>
      </div>
      <div class="elementToProof ContentPasted0" style="font-family:
        Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color:
        rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <hr tabindex="-1" style="display:inline-block; width:98%">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size: 11pt;"
          face="Calibri, sans-serif" color="#000000"><b>From:</b> Users
          <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a> on behalf of Social
          Boh <a class="moz-txt-link-rfc2396E" href="mailto:social@bohboh.info"><social@bohboh.info></a><br>
          <b>Sent:</b> Friday, February 10, 2023 3:45 PM<br>
          <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>
          <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
          <b>Subject:</b> [OpenSIPS-Users] Migrate OpenSIPs database 3_1
          to 3_2 Python Error</font>
        <div> </div>
      </div>
      <div>
        <p>Hello</p>
        <p>I'm trying to migrate OpenSIPs 3_1 database to OpenSIPs 3_2
          esquema</p>
        <p>OpenSIPs version: 3.1.13</p>
        <p>Linux: Almalinux 8</p>
        <p>Python 3</p>
        <pre class="x_escaped">opensips-cli -x database migrate 3.1_to_3.2 opensips_3_1 opensips_3_2

where opensip_3_1 is the database name of 3.1 Esquema y opensips_3_2 the name of the new opensips 3.2 Esquema
</pre>
        <p>Error:</p>
        <p>/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/default.py:552:
          Warning: (1305, 'PROCEDURE
          opensips_3_1.OSIPS_DB_MIGRATE_3_1_TO_3_2 does not exist')<br>
            cursor.execute(statement, parameters)<br>
/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/default.py:552:
          Warning: (1305, 'PROCEDURE
          opensips_3_1.OSIPS_TB_COPY_3_1_TO_3_2 does not exist')<br>
            cursor.execute(statement, parameters)<br>
          Traceback (most recent call last):<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/base.py",
          line 1244, in _execute_context<br>
              cursor, statement, parameters, context<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/default.py",
          line 552, in do_execute<br>
              cursor.execute(statement, parameters)<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/cursors.py",
          line 255, in execute<br>
              self.errorhandler(self, exc, value)<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/connections.py",
          line 50, in defaulterrorhandler<br>
              raise errorvalue<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/cursors.py",
          line 252, in execute<br>
              res = self._query(query)<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/cursors.py",
          line 378, in _query<br>
              db.query(q)<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/connections.py",
          line 280, in query<br>
              _mysql.connection.query(self, query)<br>
          _mysql_exceptions.OperationalError: (1304, 'PROCEDURE
          OSIPS_TB_COPY_3_0_TO_3_1 already exists')<br>
          <br>
          The above exception was the direct cause of the following
          exception:<br>
          <br>
          Traceback (most recent call last):<br>
            File "/usr/local/bin/opensips-cli", line 4, in
          <module><br>
             
          __import__('pkg_resources').run_script('opensipscli==0.1.0',
          'opensips-cli')<br>
            File
          "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py",
          line 654, in run_script<br>
              self.require(requires)[0].run_script(script_name, ns)<br>
            File
          "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py",
          line 1434, in run_script<br>
              exec(code, namespace, namespace)<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/EGG-INFO/scripts/opensips-cli",
          line 9, in <module><br>
              run_console()<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/EGG-INFO/scripts/opensips-cli",
          line 6, in run_console<br>
              main.main()<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/main.py",
          line 78, in main<br>
              sys.exit(shell.cmdloop())<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/cli.py",
          line 242, in cmdloop<br>
              ret = self.run_command(module, command, modifiers, params)<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/cli.py",
          line 404, in run_command<br>
              return mod[0].__invoke__(cmd, params, modifiers)<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/module.py",
          line 36, in __invoke__<br>
              return f(params, modifiers)<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/modules/database.py",
          line 789, in do_migrate<br>
              migrate_scripts, old_db, new_db, DB_MIGRATIONS[flavour])<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/db.py",
          line 827, in migrate<br>
              self.exec_sql_file(ms)<br>
            File
"/usr/local/lib/python3.6/site-packages/opensipscli-0.1.0-py3.6.egg/opensipscli/db.py",
          line 569, in exec_sql_file<br>
              self.__conn.execute(sql)<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/base.py",
          line 982, in execute<br>
              return self._execute_text(object_, multiparams, params)<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/base.py",
          line 1155, in _execute_text<br>
              parameters,<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/base.py",
          line 1248, in _execute_context<br>
              e, statement, parameters, cursor, context<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/base.py",
          line 1466, in _handle_dbapi_exception<br>
              util.raise_from_cause(sqlalchemy_exception, exc_info)<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/util/compat.py",
          line 383, in raise_from_cause<br>
              reraise(type(exception), exception, tb=exc_tb,
          cause=cause)<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/util/compat.py",
          line 128, in reraise<br>
              raise value.with_traceback(tb)<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/base.py",
          line 1244, in _execute_context<br>
              cursor, statement, parameters, context<br>
            File
"/usr/local/lib/python3.6/site-packages/SQLAlchemy-1.3.3-py3.6-linux-x86_64.egg/sqlalchemy/engine/default.py",
          line 552, in do_execute<br>
              cursor.execute(statement, parameters)<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/cursors.py",
          line 255, in execute<br>
              self.errorhandler(self, exc, value)<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/connections.py",
          line 50, in defaulterrorhandler<br>
              raise errorvalue<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/cursors.py",
          line 252, in execute<br>
              res = self._query(query)<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/cursors.py",
          line 378, in _query<br>
              db.query(q)<br>
            File
"/usr/local/lib/python3.6/site-packages/mysqlclient-1.3.14-py3.6-linux-x86_64.egg/MySQLdb/connections.py",
          line 280, in query<br>
              _mysql.connection.query(self, query)<br>
          sqlalchemy.exc.OperationalError:
          (_mysql_exceptions.OperationalError) (1304, 'PROCEDURE
          OSIPS_TB_COPY_3_0_TO_3_1 already exists')<br>
        </p>
        <pre class="x_moz-signature" cols="72">-- 
---
I'm SoCIaL, MayBe</pre>
      </div>
      y<br>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>