Flyway migrate Oracle PL/SQL dump - flyway

Flyway offers a oracle pl/sql parser, so is it possible using a pl/sql dump (.pde) for a migration?

The dump must be in .sql format. Binary exports are not supported.

Related

Does Flyway support executing multiple SQL scripts called from one SQL script?

I am trying to execute multiple scripts from one SQL file, running it in sequence. E.g. if I have V1.0__Test0.sql, and the contents are:
#V1.1__Test1.sql;
#V1.1__Test2.sql;
If I run the migrate option, I get an ORA-00900: invalid SQL statement error. Does Flyway support what I am trying to achieve?
No. This is documented in the limitations: http://flywaydb.org/documentation/database/oracle.html#limitations

how to create SQL Lite Schema

I'm retrospectively unit testing a zend application and want to use an SQL Lite database for convenience. In production we use MySQL updated with DB migrations. Simple question: How do I create an SQL Lite schema? Is it possible to automatically recreate the schema inside phpunit?
Many thanks for your help.
Are you using doctrine?
If so, you can generate the schema with doctrine's orm:schema-tool:create feature.
You can use this command to either dump the SQL, or generate your tables directly through the connection.

What language to use in Mariadb Stored procedure?

What language do you use to write stored procedures/functions in Mariadb?
Like PL/SQL in oracle, is there an equivalent language in Mariadb?
Thanks
Stored procedures and functions are written in SQL. Refer to MariaDB's Programmatic and Compound Statements and CREATE PROCEDURE documentation.
As of MariaDB 10.3 (GA since 25. May 2018), a subset of PL/SQL is actually supported in stored procedures and functions with SET sql_mode=ORACLE.
See this page for details:
https://mariadb.com/kb/en/library/sql_modeoracle-from-mariadb-103/
MariaDB follows the MySQL coding format. You can use the way we write in MySQL.
Also you can use MySQL workbench as a client to smooth work.

How to export SQLite to JSON?

Is there any way to get a SQLite view on a JSON file?
Thanks
On recent versions of SQLite, this is built in. The following:
sqlite3> .mode json
sqlite3> .once out.json
sqlite3> SELECT * from foo;
writes the table foo to out.json.
Or, directly from the command line:
sqlite3 db.sqlite3 '.mode json' '.once out.json' 'select * from foo'
.once, which writes the output of the next SQL command to the indicated file, has been in SQLite since 3.8.5 in 2014.
The .mode json is newer though, added in 3.33.0 in 2020-08. It comes with ubuntu 20.10 but older operating systems are unlikely to have that feature in their built-in SQLite version.
SQLiteStudio (sqlitestudio.pl) can export from sqlite3 database to JSON. SQLiteStudio is C++ Qt-based, open source GPLv3 licensed, Linux/macOS/Windows application with a git repository here: 'pawelsalawa/sqlitestudio'.
There are certainly ways to do this. For example, you could write a custom program that parses the JSON input via your favorite JSON processor and then generate the equivalent SQL statements to create tables, insert the rows, etc. and then import that into a SQLite capable tool (DB Browser for SQLite) to generate the actual SQLite db file.
I suspect you will be hard pressed to find a general purpose tool to accomplish this, as the content of the JSON input could vary widely, and in fact may not map well into a relational database at all.

convert sql-server *.mdf file into sqlite file

Just wondering if it is possible to convert sql-server *.mdf file into sqlite file ?
There's a C# utility to automatically do the conversion from SQL Server DB to SQLite DB on CodeProject
DBConvert for SQLite and MS SQL is a dependable bi-directional database converter which enables you to migrate data from SQLite to MS SQL server and from MS SQL to SQLite. DBConvert features: Unicode Support, Primary keys and Indexes conversion, Interactive multilingual (GUI) mode/command line mode, preverification of possible conversion errors, the ability to use MS SQL Dump if you don't have a direct access to MS SQL server, etc.
http://www.itshareware.com/prodview-code_65203--download-dbconvert-for-sqlite-and-mssql.htm
Couldnt find a free one for you!

Resources