reset password
Author Message
meera halani
Posts: 39
Posted 20:49 Apr 23, 2009 |

Duplicate key value violates unique constraint "roles_pkey"

 

Can anyone help to solve this query.

 

cysun
Posts: 2935
Posted 21:03 Apr 23, 2009 |

I guess you run csns-test-insert.sql twice. If you make some changes and want to run csns-test-insert.sql again, you need to run csns-drop.sql and csns-create.sql first to clean up the database.

Last edited by cysun at 21:03 Apr 23, 2009.
meera halani
Posts: 39
Posted 21:24 Apr 23, 2009 |

I am running it for one time only. I am running queries in following order:

csns-drop.sql

csns-create.sql

csns-insert.sql

csns-test-insert.sql

 

If i run csns-test-insert.sql first then it gives error as there is no data in users table.

yurimuradyan
Posts: 42
Posted 21:28 Apr 23, 2009 |

Don't run the csns-insert.sql. cscs-test-insert.sql does install users i0000-...

cysun
Posts: 2935
Posted 21:29 Apr 23, 2009 |
meera halani wrote:

I am running it for one time only. I am running queries in following order:

csns-drop.sql

csns-create.sql

csns-insert.sql

csns-test-insert.sql

 

If i run csns-test-insert.sql first then it gives error as there is no data in users table.

Don't run csns-insert.sql. Spend some time reading the scripts to understand what they do.

meera halani
Posts: 39
Posted 21:48 Apr 23, 2009 |

Thank you. Done i got it where i was making mistake.