Coder Social home page Coder Social logo

dbv's People

Contributors

celorodovalho avatar davidcroda avatar drewsonne avatar hansek avatar jdecool avatar lucanos avatar tierra avatar varunagw avatar verdet23 avatar victorstanciu 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  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

dbv's Issues

Mysql port number

I'm getting
[2005] SQLSTATE[HY000] [2005] Unknown MySQL server host 'instance7844.db.xeround.com:5396' (1)

Is it me or are port numbers unsupported?

Error with accent mark in revision

Hi, I'm getting an error when I try to apply a revision, the query is as follows

INSERT INTO control_units(model, type, name, abbr, to_mx_factor, to_us_factor) VALUES 
('Vehicle', 'volume', 'Litro(s)', 'Lt.' , 1, 3.78541178), 
('Vehicle', 'volume'  , 'Galón(es)', 'Gal' , 3.78541178, 1), 
('Vehicle', 'distance', 'Kilometros(s)', 'KMS.', 1, 1609.34), 
('Vehicle', 'distance', 'Milla(s)', 'Mi'  , 1609.34, 1), 
('All'    , 'currency', 'Peso(s)', 'MXN' , 1, 12.1555), 
('All'    , 'currency', 'Dólar(es)', 'US' , 12.1555, 1);

And the error says: Incorrect string value: '\xF3n(es)' for column 'name' at row 2

So the issue is with the word Galón(es)
Is there a way to bypass this error while it is fixed?

I'm working with the official release v1.1 by the way

Prototype ajax post not working in Chrome 24.0.1312.14

Error on applying revision

Hello everybody, and first of all, please excuse me for my bad english.

I use dbv on several projects for a few months now, and I have an issue on one project :
I can export new tables to database withtout problems, but when I try to push a revision, nothing happens. Ths revision div "blinks" one time (opacity reduces then comes back), and on the console, I have this message :


Fatal error: Uncaught exception 'RuntimeException' with message 'DirectoryIterator::__construct(/homepages/24/d440383773/htdocs/projet/atomesprod/dbv/data/revisions/2147483647) [<a href='directoryiterator.--construct'>directoryiterator.--construct</a>]: failed to open dir: No such file or directory' in /homepages/24/d440383773/htdocs/projet/atomesprod/dbv/DBV.php:355 Stack trace: #0 /homepages/24/d440383773/htdocs/projet/atomesprod/dbv/DBV.php(355): DirectoryIterator->__construct('/homepages/24/d...') #1 /homepages/24/d440383773/htdocs/projet/atomesprod/dbv/DBV.php(146): DBV->_getRevisionFiles(2147483647) #2 /homepages/24/d440383773/htdocs/projet/atomesprod/dbv/DBV.php(92): DBV->revisionsAction() #3 /homepages/24/d440383773/htdocs/projet/atomesprod/dbv/index.php(9): DBV->dispatch() #4 {main}

thrown in /homepages/24/d440383773/htdocs/projet/atomesprod/dbv/DBV.php on line 355

The fact is that I don't have a revision 2147483647. Il I create a directory whith that name under "revision", I don't have the error message anymore, but I when apply a revision, it always applies revision 214748367 (which is empty...).
What can I do ?

Why not allow comparision?

As it stands, this tool is little better than a very carefully crafted mysqldump command. You leave it to the underlying version control system to "store" changes, but there is no reason to not allow your tool to "explore" changes. Your icons now say "yes" and "no" but they should say "changed" as well.

Suggested use on production environments

I don't see a command line interface, what is the recommended way to implement dbv in a production environment? Are you just using the HTTP password protection?

Callback hooks

Version 2.0 should allow developers to hook into the revision process at any stage. DBV should be an event emitter that hooks can listen on for events such as "revision.before", "revision.after", etc, using a syntax along these lines:

$dbv->on('revision.executed', [callable]);

I've actually stripped this capability down before launching, because I wanted to brush it off a bit. I've been using it to call a PHP script that removed some cache files after each revision script was executed and someone just coincidentally requested this feature, so I'm adding it to the 2.0 milestone.

Problem Access dbv.php

Hello;

I'm new with this module. It's impossible for me to access 'access denied'. Here is my config file:

define('DB_HOST', 'localhost');
define('DB_PORT', 22);
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'Hakim2013');
define('DB_NAME', 'testM');

define('DBV_USERNAME', 'meriem');
define('DBV_PASSWORD', 'meditoo2013');

When I want to access with this username and password: access denied

http://mydomain/dbv

Please, what should I doing

Best regards.

passwords do note work

tried setting both to 'test' and 'test' and could not login using basic auth. On Fedora 20.

Why not just pass through the database credentials like phpmyadmin does.

if you know how to log in to the database, that becomes the same information needed to log in to the web too.

Ignore DS_Store files

Sadly when creating files OSX creates hidden .DS_Store by default. This breaks running revisions, the only fix is to delete the .DS_Store from the command line or enable view hidden files in finder and deleting it.

Adapter for SQL Server

Hi Guys

I want to use dbv with MS SQL server. I am wondering if there exist any adapter for SQL server which can be useful for me.

Thanks in advance.

Data Export

Would be very handy to also export table data into separate files as it is done with schemes. Recently I was trying to find software where you can back-up & restore database schemes from separate files (1 file per table scheme, 1 file per table scheme) and could not find anything. DBV is very close to this, I think it can become very popular for users who like to version control files/database via GIT/SVN/HG (especially me).

Support for multiple, separate projects

Is it possible to have dbv.php installed in a central location managing multiple projects independently? Imagine you're developing a dozen different websites locally, but you only want to install/maintain a single installation of dbv.php, managing all websites' databases.

Is this already possible or would it be possible to implement this? That would be really awesome!

Export DB Data alongside the Schema

I notice that this tool only provides the ability to update schema (unless I'm mistaken)
Is it possible to Export Data alongside the schema?

compare two database states and generate sql for difference

Hello and thank you for your great work!

Scenario:

  • I have a wordpress database and I am preparing to install a plugin.
  • after installing the plugin I don't know the SQL modifications that were made and it would be cook to have them in a revision because:
  • when other developers will pull the code and they'll notice the plugin I may also have configured the plugin and would be nice to have the latest plugin data as a revision without the need to install the plugin themselves.

Do you have any thoughts how to approach the issue?

Thank you,
Radu G.

Run selected revisions - does nothing...

So I have dbv setup ...

screen shot 2013-10-28 at 5 33 28 pm

Adding this first revision:

dbv/data/revisions/001/Tour.sql

ALTER TABLE `Tour`
ADD `Protected` boolean;

ALTER TABLE `Tour`
ADD `Draft` boolean;

However when I press the button "Run Selected Revisions" the button becomes disabled (I suppose as if it's been successful.) There's no other feedback either way.

Anyway, checking with MySQL (via mysql command line) the new columns do not exist.

Am I doing something wrong? Is the activity (and failure?) logged somewhere?

I also had problems getting the authentication to work and had to disable it to be able to view the dbv UI. (I'll file another issue for this if necessary.)

Dbv looks great by the way, so I hope this is just a problem between the chair and keyboard.

Simple diff between versions

If I understood correctly you have to write in a script the change you make in your database for doing a revision. Is there a way to do it automatically as a diff system ?

Thanks.

Multiple Database Support

It would be awesome if we could differentiate between multiple databases and tracking where each 'commit' is at.

Just like how Git works, databases would be branches...

.DS_Store in revisions

Hi,

firstly PERFECT TOOL. Thanks for that.

Can you just accept *.sql in data/revisions?

Thanks.

Documentation recommends unsafe directory permissions

Hi:

I was just checking over the documentation and someone pointed out to me that the directory permissions on the documentation for installation recommend chmod 777. This is probably not very safe and I would say that this should be an unrecommended 'if all else fails' solution.

Here's the specific lines:

cd dbv
chmod -R 777 data

Located here: http://dbv.vizuina.com/documentation/

PS: I would have made a pull request but I don't see the documentation on github.

[GUI] Show loading indicator when executing AJAX requests.

I'm executing an alter table query right now that adds indexes on a table. Naturally, I forgot that this table already has 7 million rows, and now i get now UI feedback that the process is still running.

maybe add an optional warning before starting 'add index' queries here?
You don't want to do this accidentally on production, most likely...

Git and revision number

Hello,

As you said in the tutorial, we have to create a folder called with the numerical id of the commit. But Git don't provide this kind of number.

Do I have to create new folder with increment number :
1 -> 2 -> 3 etc ? (For me is the better way)

Thanks in advance

Regards

Not clear how to and when to update schema

I've sent you an email but did not recieve any answer, so I write you here...

After configuring dbv for my database I export to disk the schema.
Now, I need to do some changes to my database, so I create a revision file. This revision changes a table name:

table: user ---> renamed to users

After I appy this revision, main screen says table user does not exists in DB but in Disk, and lets me create again that table by "Push to database".

What's the required step here? Is table user going to appear in the list forever?
Shouldn't new revisions update the schema automatically?

Rollback

Thank you for this great tool.
I can't see a way in your documentation to rollback to a particular point - is that available or something you are adding?
Thanks,
Josh

I find an bug in pdo.php

when run selected revisions , i could not know error message about sql error, because function query don't throw any exception!

should change
public function query($sql)
{
return $this->_connection->query($sql);
}

to
public function query($sql)
{
try{
return $this->_connection->query($sql);
}
catch(Exception $e) {
throw new DBV_Exception($e->getMessage(), (int)$e->getCode());
}
}

Multiple databases?

(Warning; thinking out loud...)

It looks (after a cursory glance at the code) that it'd be a fair bit of work to enable a multi-database setup. I only have experience with MySQL, and cross-database queries aren't that much of a problem there, so keeping track of changes across databases isn't the biggest issue. It's mostly about how to display things (show everything in one big list? switch views depending on which database you're working on?) and making sure the adapter knows what to do.

Thoughts? Is multi-DB support something that might be in the cards at all?

error undefined function bindtextdomain()

dbv works fine when I run mamp, but when I run my separate installations of apache, mysql, and php, I get this error when I go to dbv.

Fatal error: Call to undefined function bindtextdomain() in /Users/aharris88/Sites/mysite/dbv/config.php on line 53

group items by type

there are already function in the adapter to fetch various types of sql from the db(table, trigger procedure..), would be nice if they were groupe and visually separated in the interface

numeric revision with leading zeroes - failed to open dir

If a revision directory is numeric but with leading zeroes (say, "001"), DBV throws

PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(/.../revisions/1): failed to open dir: No such file or directory' in /.../DBV.php:353\nStack trace:
#0 /.../DBV.php(353): DirectoryIterator->__construct('/...')
#1 /.../DBV.php(146): DBV->_getRevisionFiles(1)
#2 /.../DBV.php(92): DBV->revisionsAction()

...

It's not documented so probably a bug ;).

Anyway I suggest requiring dirs under revisions to have a numeric prefix so you know the order but saving the whole name. I might for example want to use 001-$git_revision. But either way, it needs to support 001.

Thanks.. :)

Lookup table data

How would you deal with look-up table data? Which is also part of the database initial state.

content tracking

First of all, love this tool! The one suggestion I would make is to make it easier to track table content. For now I'll probably end up saving insert queries as a revision, but it would be nice to have a more straightforward way to do that.

auto increment should start at 1

currentl, if you have data in tables the exported ddl contains auto increment with the value i currently have in db. it doesn't make sense for other team members to start at with auto increment at my value rather than at 1.

i know it's a mysql thing, but could this be fixed somehow?

Problems with databases that have foreign keys

When importing a database schema with foreign keys, it can happen that the import fails because it cannot add certain foreign keys.

You can easily fix that by running SET FOREIGN_KEY_CHECKS = 0 before the import, but I'm not sure every user would want this.

So anyways, there should be an option for that at least!

Update
I just found out that mysqldump switches off foreign key checks by default, so I think its okay to do that. But I don't know if this works with other DBMS too.

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.