I have tables roles,privileges and permissions( It joins roles and
privileges). Now at application startup I have to seed these tables with
data. But during runtime some additionals rows may be added to
permissions. But I dont how at a later stage if I run rake db:seed_fu
all data that I set later to permissions may be wipeout. I dont know how
to handle this.
This is presumably a follow on to your previous thread. You never
explained why you are repeatedly seeding the database, this is
normally something that would be done only once.
Suppose I have the development phases like phase1,phase2, etc. So
for example in Phase1 I have to seed data to say table1 (rake
db:seed_fu) And it is deployed.
Now again in phase2 again I have to seed data to table2 . Then also to
sseed data I run
rake db:seed_fu
But when ever I run this command it seeds data to table1 (once
more) and table2 (for the first time). Is n't it? I think I can answer
your question. But could you please give answer to my original questions
posted in this thread.
Suppose I have the development phases like phase1,phase2, etc. So
for example in Phase1 I have to seed data to say table1 (rake
db:seed_fu) And it is deployed.
Now again in phase2 again I have to seed data to table2 . Then also to
sseed data I run
rake db:seed_fu
But when ever I run this command it seeds data to table1 \(once
more) and table2 (for the first time). Is n't it? I think I can answer
your question. But could you please give answer to my original questions
posted in this thread.
Remove the data for the first table from the seed code once you have
done it, so that the next time it just seeds the second one. You can
always get the old version back from your version control system if
you ever need it again.