# migrate-cubrid-to-mysql

> Migrate cubird to mysql.

Latest version **0.1.0** (published 2013-01-07) · BSD license · 0 weekly downloads

## Install

```sh
npm install migrate-cubrid-to-mysql
pnpm add migrate-cubrid-to-mysql
yarn add migrate-cubrid-to-mysql
bun add migrate-cubrid-to-mysql
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2013-01-07 |
| First published | 2013-01-04 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Denny Lim |
| Maintainers | iamdenny |
| Keywords | migrate, cubrid, mysql, convert |

## Links

- npm: https://www.npmjs.com/package/migrate-cubrid-to-mysql
- Repository: https://github.com/iamdenny/migrate-cubrid-to-mysql
- npm.io page: https://npm.io/package/migrate-cubrid-to-mysql

## Dependencies (3)

- [mysql](https://npm.io/package/mysql.md) 2.x.x
- [node-cubrid](https://npm.io/package/node-cubrid.md) 1.x.x
- [generic-pool](https://npm.io/package/generic-pool.md) 2.x.x

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2013-01-07
- 0.0.50 — 2013-01-07
- 0.0.49 — 2013-01-07
- 0.0.48 — 2013-01-07
- 0.0.47 — 2013-01-07
- 0.0.45 — 2013-01-07
- 0.0.44 — 2013-01-07
- 0.0.43 — 2013-01-07
- 0.0.42 — 2013-01-07
- 0.0.41 — 2013-01-07
- 0.0.40 — 2013-01-07
- 0.0.39 — 2013-01-07
- 0.0.38 — 2013-01-07
- 0.0.37 — 2013-01-07
- 0.0.36 — 2013-01-07
- … 35 more at https://npm.io/package/migrate-cubrid-to-mysql/versions

## README

# Migrate-Cubird-To-Mysql

Migrate cubird to mysql.

## How to Install

NPM
```bash
npm install migrate-cubrid-to-mysql
```

GIT
```bash
git clone https://github.com/iamdenny/migrate-cubird-to-mysql.git
```

## How to use

Make tables schema on Mysql same as tables schema on Cubrid first.

app.js
```js
var Mcm = require('migrate-cubird-to-mysql');
var htCubrid = {
    sHostname : '127.0.0.1',
    sUser : 'username',
    sPassword : 'password',
    nPort : 1527,
    sDatabase : 'database'
};
var htMysql = {
    sHostname : '127.0.0.1',
    sUser : 'username',
    sPassword : 'password',
    nPort : 3306,
    sDatabase : 'database',
    bDebug : false
};
var oMcm = new Mcm(htCubrid, htMysql);

oMcm.once('connected', function(){
	// first arg : oracle query
	// second arg : mysql table name
	// third arg : truncate(delete data from mysql table)
	// forth arg : callback
    oMcm.migrateByQuery("SELECT * FROM user", 'user', true, function(htResult){
          console.log('First migration is done', htResult);
      });

    oMcm.migrateByQuery("SELECT * FROM group", 'group', true, function(htResult){
          console.log('Second migration is done', htResult);
      });
    
    oMcm.migrateByQuery("SELECT * FROM article", 'article', true, function(htResult){
          console.log('Thrid migration is done', htResult);
      });      
}).once('done', function(htResult){
    console.log('All done', htResult);
    process.exit(0);
});
```

Execute
```bash
node app.js
```

---
_Source: https://npm.io/package/migrate-cubrid-to-mysql · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
