# Nicâ?s Magic Models, how about Magic Schema

**URL:** <https://www.ruby-forum.com/t/nica-s-magic-models-how-about-magic-schema/101948>\
**Category:** Rails\
**Created:** [August 8, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/nica-s-magic-models-how-about-magic-schema/101948 "2006-08-08T20:53:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpigford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jpigford](https://www.ruby-forum.com/u/jpigford)\
**Post date:** [August 8, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/nica-s-magic-models-how-about-magic-schema/101948/1 "2006-08-08T20:53:41Z")

</div>

I side with David when it comes to databases. They suck! Just my own  
opinion.

So what about the people who don’t want to define validations and stuff  
in the database, but still want to be DRY.

I really hate how the schema is separate from my models. I kind of like  
how Django defines the table attributes in the model. I was think about  
trying something like that in Rails.

You could define the attributes in the model and run a special generator  
that creates a migration from the schema.

Any ideas? I’m just brian storming right now.

---

<div class="post-metadata">

**Author:** ![jpigford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jpigford](https://www.ruby-forum.com/u/jpigford)\
**Post date:** [August 8, 2006, 9:14pm UTC](https://www.ruby-forum.com/t/nica-s-magic-models-how-about-magic-schema/101948/2 "2006-08-08T21:14:11Z")

</div>

> I really hate how the schema is separate from my models. I kind of like  
> how Django defines the table attributes in the model. I was think about  
> trying something like that in Rails.
> 
> You could define the attributes in the model and run a special generator  
> that creates a migration from the schema.

It’d be interesting to talk with some Django developers - from both  
small and large projects - to see what works well for them.

Does anyone know some Django users we can interrogate?

Cheers  
Nic

---

<div class="post-metadata">

**Author:** ![jpigford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jpigford](https://www.ruby-forum.com/u/jpigford)\
**Post date:** [August 8, 2006, 9:17pm UTC](https://www.ruby-forum.com/t/nica-s-magic-models-how-about-magic-schema/101948/3 "2006-08-08T21:17:47Z")

</div>

Josh P. wrote:

> I side with David when it comes to databases. They suck! Just my own  
> opinion.

Huh?!? Much better than using text files…

Joe

---

<div class="post-metadata">

**Author:** ![jpigford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jpigford](https://www.ruby-forum.com/u/jpigford)\
**Post date:** [August 8, 2006, 9:24pm UTC](https://www.ruby-forum.com/t/nica-s-magic-models-how-about-magic-schema/101948/4 "2006-08-08T21:24:39Z")

</div>

Joe R. wrote:

> Josh P. wrote:
> 
> > I side with David when it comes to databases. They suck! Just my own  
> > opinion.
> 
> Huh?!? Much better than using text files…

And they scale a lot better than large XML files 🙂

Paper tape could be an option…

---

<div class="post-metadata">

**Author:** ![jpigford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jpigford](https://www.ruby-forum.com/u/jpigford)\
**Post date:** [August 15, 2006, 2:18pm UTC](https://www.ruby-forum.com/t/nica-s-magic-models-how-about-magic-schema/101948/5 "2006-08-15T14:18:43Z")

</div>

that’d be great against unemployment! pay people for writing your data  
to  
paper, search records etc… the human database… sounds like magic to  
me

2006/8/8, Dr Nic [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Paper tape could be an option…
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Michael S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

[www.stellar-legends.de](http://www.stellar-legends.de) - Weltraum-Browsergame im Alpha-Stadium
