Code Monkey home page Code Monkey logo

java2sql's Introduction

java2sql

Build Status

Introduce

java2sql 是一款基于java代码开发的数据库命令行构建工具。通过简单的命令生成和迁移填充数据库数据。 受 Laravel Artisan Migrate/Seeder 功能启发开发而成。

Features

  • 利用简单的 Java 代码书写,Java开发者的自然优越感
  • 用命令行操作,使用更加简单
  • 代码复用率更高

Todo

  • DatabaseAdapter
  • TableAdapter
  • FieldAdapter
  • MysqlAdapter
  • MysqlTableAdapter
  • MysqlFieldAdapter
  • Migration
  • Seed
  • 迁移文件、数据填充生成
  • Console/Terminal 上运行
  • 优化代码
  • 进入不定期维护阶段

Requirements

  • Windows/Linux/macOS
  • JDK 1.7+

Installation

下载target文件夹下的java2sql*.jar文件到生产环境下即可。

如需在系统中全局运行请将该文件所在文件夹路径设置到环境变量

  • Windows 下请设置到 计算机->属性->高级系统设置->环境变量->系统变量->Path
  • macOS
  • Ubuntu

Quick Start

  • seeds 文件夹存放生成的数据库表填充数据文件

  • migrations 文件夹存放生成的数据表迁移文件

  • migration:UsersMigration 生成名为UsersMigration的迁移文件

  • migrate:UsersMigration 迁移名为UsersMigration的迁移文件,目标名为Users

  • seed:UsersSeed 生成名为UsersSeed的填充文件

  • seeder:UsersSeed 填充名为UsersSeed的填充文件,目标表名为Users

请按照以上命名规则生成相对应文件,如要生成名为Users数据库表迁移文件,就执行如下命令migration:UsersMigration,数据库表填充文件如上方式。

Changelog

2017.07.15

  • 实现 Migration、Seeder 等基本功能

Screenshots

Discussing

java2sql's People

Contributors

godcheese avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.