Code Monkey home page Code Monkey logo

mysql-workbench-plugins's Introduction

Plugins for MySQL Workbench

For Drupal 7

To install these plugins, download the .py files to your computer and install them by launching MySQL Workbench and click on

Scripting->Install Plugin/Module

Install each file, then restart MySQL Workbench.

drupal_grt.py

This plugin makes it easier when testing/writing queries during drupal module development. After installing the plugin, it adds two menu options (In the SQL Editor View):

Plugins->Utilities->Strip curly braces from table names
Plugins->Utilities->Copy as Drupal query to clipboard

The first command removes the curly braces from around table names. eg. SELECT * FROM {users}; => SELECT * FROM users;

The second command does the opposite and copies the result to the clipboard: SELECT * FROM users; => SELECT * FROM {users};

Known limitations:

  • Does not handle table prefixes - it's maybe possible to auto-detect this from the existing tables names
  • Curly braces may be stripped if they occur in a string value. This is a rare occurance.

drupal_schema_grt.py

This plugin dumps tables to a drupal schema. See (https://drupal.org/node/693138) for original discussion.

After you install this plugin, to use it: "Create New Model" follow through on sensible defaults. Then in the MySQL Model view you will find the menu option:

Tools->Catalog->Generate Drupal Schema

This will copy your hook_schema() definition to your clipboard which you can then copy into your .install file.

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.