Comments (11)
According to http://dev.mysql.com/doc/refman/5.5/en/alter-table.html, you can just
ALTER TABLE t1 ENGINE = InnoDB;
to switch to InnoDB. This wouldn't fix existing brokenness due to triggers/constraints not being enforced, but neither would dumping data and restoring it...
from barkeep.
Why wouldn't dumping and restoring fix (or at least reveal) brokenness in constraints? The process I'm imagining is
mysqldump
all the tables (with the option to not create the tables first)- Blow away the DB and run the migrations from scratch (now they will be InnoDB and have constraints)
- Import all the
.sql
files.
from barkeep.
You're right - dumping/restoring would show issues with constraints,
though not with transaction trigger failures that don't have associated
constraints. I have no idea how they're used, so I don't know the
balance of what would be helped or not.
On Thu, Sep 01, 2011 at 04:51:35PM -0700, cespare wrote:
Why wouldn't dumping and restoring fix (or at least reveal) brokenness in constraints? The process I'm imagining is
mysqldump
all the tables (with the option to not create the tables first)- Blow away the DB and run the migrations from scratch (now they will be InnoDB and have constraints)
- Import all the
.sql
files.Reply to this email directly or view it on GitHub:
#20 (comment)
from barkeep.
Innodb is now being used for all tables going forward as of 0f58f63.
from barkeep.
Closing per philc's comment.
from barkeep.
Reopened until we switch prod to use InnoDB
from barkeep.
Actually, we still have all the work left to do on this issue. We still need to modify the old migrations to use InnoDB, and we still need to fix the old migrations to not be broken when using InnoDB. Then we need to make the prod switch.
from barkeep.
OK, I think I've done the bulk of the necessary work here. I've pushed major migrations changes to the branch innodb_switch. I can now bring up a mysql db from scratch with InnoDB and run Barkeep. Tomorrow I will work with someone else to make the switch in prod; until then, I will leave this change unmerged.
from barkeep.
Alright, I dumped the prod DB and imported on my own local MySQL that had previously had the InnoDB-ified migrations applied to it.
We'll merge that branch and push to prod tonight; for reference, here are the steps:
-
Dump the database:
mysqldump -u<user> -p<pw> --no-create-db --no-create-info --ignore-table=barkeep.schema_migrations barkeep > barkeep.sql
-
Manually edit the SQL file to delete the user entry "demo" (primary key 1) from around line 108. (The migration inserts this for us).
-
Drop the DB and create it again:
mysql -<user> -p<pw> -e "drop database barkeep; create database barkeep;"
-
Push the new code with the fixed migrations.
-
Run the migrations.
-
Verify that we're now using InnoDB by examining the output of this command from the mysql prompt:
show create table table_name \G
-
Import the data:
mysql -u<user> -p<pwd> barkeep < barkeep.sql
-
Start up barkeep and verify that the data is there.
from barkeep.
Fixed in prod.
from barkeep.
OK, the fixed migrations have been merged in and pushed. I think we're good to go now.
from barkeep.
Related Issues (20)
- Merged commits bypass email preferences
- Signed commits failed on parsing and UI fails to display them
- Intro video without music?
- Suggestion: in keyboard shortcuts popup, write 'esc' next to the close X
- Barkeep refuses to build on modern-ish systems HOT 1
- Demo is gone HOT 2
- Source/branch browsing HOT 1
- barkeep installation script for Mac OSx
- Sequel::Error method email= doesn't exist
- OpenID provider "simpleid": authentication not possible
- init: barkeep-web-1 main process ended, respawning HOT 4
- Link is broken on website HOT 4
- NULL user created if you hit 'cancel' on Google login page HOT 2
- Installation does not work on ubuntu 12.04: Bad Gateway HOT 2
- Not able to install barkeep with vagrant HOT 1
- Barkeep's Ruby 1.9.3 is unable to compile on Ubuntu 14.04
- Installing nokogiri dependency fails on clean ubuntu.
- Unable to contact OpenID server: Error on barkeep
- Barkeep alternative for Continuous Code Review
- Code Review Based On a Checklist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barkeep.