It depends on what is important to your business. Ideally, you shouldn't short change either, but if you must, you should also ask yourself this question:
Is your application there to handle data, or does the data transcend your application?
In other words, if the code part of your application blew up today, but your data is still there, how bad of a disaster would it be? If you answer is:
I can always write the code to replace the app, but without the data, we're doomed.
Then you had better make sure that your data is sound, because it will probably outlive any code you write today. That's not to say you shouldn't put a great amount of effort into writing a solid codebase, but the code is ultimately transient whereas your data is not. If you're stuck with bad code, you can rewrite, but if you have bad data, it will likely have much broader implications.
On the other hand, if the data is really only there to make sure that your code works well, and the code itself is more important (the inverse of the above scenario), you should ensure that you have a good codebase, and revisit any deficiencies in the data later.
EDIT
In most enterprise applications, the data are far more important. I have worked on conversion projects in the past where the code was far past its life, but migration was delayed for so long (sometimes decades) because the data was so bad that it took a significant and very discretionary effort to get the data to a point of health where it could be migrated.