This is a blatant repost. About 10 minutes ago, I posted this in the wrong forum, because i am that smooth :) Anyway...
Im migrating a walled garden access point system for pre-pay internet access to drupal. I currently have a few hundred accounts who have purchased various amounts of credit for the service. I would rather not have to manually log in to each account, and send them a redemtion code, or some such thing, in order to provide them with their credits when we move to the new system, and I am trying to find some seamless translation strategy.
What i am doing now is this. I have roles set up, for prepayed service, and you can buy products in 5 dollar chunks. These, as I bet you know, come up in the ec_transaction and ec_transaction_product tables. Currently, I have a custom freeradius module that i have written that extracts the amount of credit that they have from the table, and uses that to calculate their remaining credit.
The bugger is that i need some way for an initial value to be assigned to each account. One way that I have been considering is to simply write a transition script that imports the user accounts, and then generates transactions for each of the accounts, that are not billed, but exist only on the transaction table. the point being to generate an entry on the table that my radius module finds and gives them credit for, without putting real transactions through the system, or resorting to the redemption code thing.
My question is this. If i insert a bunch of rows into those tables, am I going to currupt the drupal db's in some serious manner? will they figure out that "hey, txnid 3 through 456 is already used" or is it going to freak out and go "kraaghagarhoooom" into a fireball?
if it is going to do the latter, anyone have any clever tricks for assigning an initial value to an account generated through the user import module? am I doomed? please tell me im not doomed, I hate being doomed so much.
Much thanks:
Jester
Comments
go for it
Just make sure you insert the rows in the sequences table for any column that is set to auto increment.
Have fun and check my Drupal Profile: http://drupal.org/user/519