Giter Site home page Giter Site logo

pyistanbul / dbpatterns Goto Github PK

View Code? Open in Web Editor NEW
357.0 39.0 51.0 911 KB

Dbpatterns is a service that allows you to create, share, explore database models on the web. Built on top of Django, Backbone. Patterns are stored on MongoDB, and uses Lettuce for BDD approach.

License: Other

Shell 0.01% Python 11.21% Elixir 0.05% CSS 5.34% JavaScript 77.52% HTML 5.20% Gherkin 0.67%
mongodb database

dbpatterns's Introduction

Db-patterns

Dbpatterns is a service that allows you to create, share, explore database models on the web.

Notes:

The previous domain is not active anymore.
Project might be relaunched under a different domain

Installation

Install mongodb:

sudo apt-get install mongodb
# or on mac
sudo brew install mongodb

Start mongodb:

mongod

Create a virtual env:

virtualenv dbpatterns
source dbpatterns/bin/activate

Clone the repository and install requirements:

cd dbpatterns
git clone git://github.com/fatiherikli/dbpatterns.git
pip install -r dbpatterns/conf/requirements.pip

Create a file that named settings_local.py Configure the database and secret key.

cd dbpatterns/web/dbpatterns
vim settings_local.py

The example of configuration:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'data',
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    }
}

SECRET_KEY = '<SECRET-KEY>'

And run the following commands:

cd ../
python manage.py syncdb
python manage.py runserver

That's all. You can access to dbpatterns on https://localhost:8000

dbpatterns's People

Contributors

bahattincinic avatar cangoktas avatar hasantayyar avatar msurguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dbpatterns's Issues

Exported SQLite Script FKs does not work

OS: Microsoft Windows [Version 10.0.14372]
SQLite Version: 3.10.1 2016-01-13 21:41:56 254419c36766225ca542ae873ed38255e3fb8588

I had to manually edit FK sections of exported Sqlite script since it throws syntax error.

  • I splitted Column and FK definitions
  • Moved FK definitions to last lines of table definitions.

Uploaded buggy and fixed scripts as a Gist , Download as Zip with

  • Import scripts (bat and shell scripts)
  • Original and fixed sql scripts
  • With a simple diff file

Example:

I fixed manually changing this section:

CREATE TABLE "Led" (
    "id" int PRIMARY KEY,
    "oda_id" int FOREIGN KEY("oda_id") REFERENCES "Oda" ("id"),
    "status_id" int FOREIGN KEY("status_id") REFERENCES "Status" ("id")
);

To:

CREATE TABLE "Led" (
    "id" int PRIMARY KEY,
    "oda_id" int, 
    "status_id" int,
    FOREIGN KEY("oda_id") REFERENCES "Oda" ("id"),
    FOREIGN KEY("status_id") REFERENCES "Status" ("id")
);

Agree/Disagree counters on comments.

Please consider adding agree/disagree counters on comments (or some other reaction counter) to limit follow on comments like 👍 and help us build consensus.

Default Type feature can be improved

dbpattern now supports automatically assigning field types by field name like id is integer, etc.
But more names and types can be supported, such as:

  • done, open, closed, canceled, active, is_active: boolean
  • amount, total, debit, credit, grand_total, sub_total: currency

(assumed that is_active, isActive and IsActive expressions are identical)

Entity notes

A "notes" feature may be helpful, like in mysql tables "table notes";

Remove an attribute

I doesn't seem to be currently possible to delete an attribute once it's been created – I found no shortcut nor button to achieve that. Is it possible and if so how ?

Profile edit/delete

Hi, first sorry for posting this here but, how can I edit my profile or delete it? I want to change my username

Thanks

Multiple component primary keys are exported wrong

Create a table, add two fields, mark both as PRIMARY KEY. Export as Postgres. This is what's generated:

CREATE TABLE a(
  f1 int PRIMARY KEY,
  f2 int PRIMARY KEY
);

This is what's desired:

CREATE TABLE a(
  f1 int,
  f2 int,
  PRIMARY KEY(f1, f2)
);

multiple foreign keys

when adding multiple foreign keys from one table to the other, the connection lines(and the text) overlap making it hard to read the connection details.

Polymorphic foreign keys

Is it possible to show polymorphic foreign keys of that type, as done by Rails (Ruby) or Laravel (PHP) ?

column type
illustrable_type string
illustrable_id integer

I'm assuming this is not possible because SQL doesn't have any structure for it but as DBPatterns is more of a "representation" tool to me it'd seem logical to be allow to "show" that, maybe by specifying a list of entities in the foreign key field, like Book,Author or something.

Import feature

Import from well formatted sql files will be a useful feature.

Bağlantılar Kayboluyor

Oluşturduğun entityleri birbirine bağlayıp kayıt ettikten sonra tekrar görüntülemek istediğimde bağlarının görünmediğini farkettim.

Patterns with different Stati

I would very much like to be able to work on a pattern before it goes into the live system.

Similarly I would like the ability to have private patterns. I would suggest introducing a status to the pattern model. Then a publishing style platform.

p.s. If you were to include a private option, I would pay for this.

Document Settings Edit

Clicking the Edit Gear icon to edit a doc's settings causes another dialog to popup, but with incomplete properties, as some are added to the original dialog box. Selecting the edit icon multiple times, creates more dialogs with the same issue.

before
after

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.