victorstanciu / dbv Goto Github PK
View Code? Open in Web Editor NEWDatabase version control, made easy!
Home Page: http://dbv.vizuina.com
Database version control, made easy!
Home Page: http://dbv.vizuina.com
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?
Changing the schema in the database using PHPMYADMIN isn't picked up by the DBV app
(BUG) Every time I scroll (chrome) i get returned to the top line of a schema change.
This way it's impossible to read the full changelog.
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
The post global in php is empty when sending from here https://github.com/victorstanciu/dbv/blob/master/templates/schema.php#L68 .. to here https://github.com/victorstanciu/dbv/blob/master/DBV.php#L108
I've come across this before in chrome where the headers that are sent in the ajax request are not lowercase.
Changing these lines:
https://github.com/victorstanciu/dbv/blob/master/public/scripts/prototype.js#L1556
https://github.com/victorstanciu/dbv/blob/master/public/scripts/prototype.js#L1607
https://github.com/victorstanciu/dbv/blob/master/public/scripts/prototype.js#L1728
to lowercase content-type
fixes the issue.
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 :
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 ?
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.
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?
PHP Version 5.3.3
PDO is installed.
I've recently encountered a security issue with DBV - please provide a contact address so that it can be reported privately.
Thanks,
~rbsec
how about a composer package?
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.
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
Please, what should I doing
Best regards.
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.
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.
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.
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).
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!
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?
Hello and thank you for your great work!
Scenario:
Do you have any thoughts how to approach the issue?
Thank you,
Radu G.
So I have dbv setup ...
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.
hi victor, great ideas about dbv n great job. but when i try i got this error
Fatal error: Call to undefined function bindtextdomain() in C:\wamp\apps\dbv-1.1\config.php on line 53
any suggestion?
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.
Basically what it says in the subject.
One of our databases has 170+ tables, so it takes a fair bit of scrolling to see if there's tables with changes. If those could be hoisted to the top, or maybe filtered on ("only show me tables with changes"), that'd make stuff a lot easier.
would it be possible to add a switch or something to not export these information?
After putting in the database settings in the config file, I open up DBV.php via wamp server "http://localhost/sitename/dbv-1.1/DBV.php" in Firefox 24.0 and it's blank. What am I doing wrong?
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...
Hi,
firstly PERFECT TOOL. Thanks for that.
Can you just accept *.sql in data/revisions?
Thanks.
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.
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...
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
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?
DBV.php migrate
There's no hint when you run a revision and everything works ok.
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
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());
}
}
Please remove this issue, it was created by mistake. Sorry.
(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?
It is simple to list the databases on the system. So why do I need to specify one in the configuration file?
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
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
Hey, excellent project and all, but you should be aware of the existence of this tool:
https://bitbucket.org/idler/mmp/wiki/Home
how about incorporating the two!
Edit: the project page is now at
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.. :)
When the system loads, it should compare the filesystem schema to the database schema so that objects that differ can be highlighted.
i'm sure the sql is there somewhere, would it be possible to show it? either in hover or in some box under the revisions
How would you deal with look-up table data? Which is also part of the database initial state.
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.
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.