gnuherds-app-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: task 8833 -- steps 1 and 2


From: Federico Gimenez Nieto
Subject: Re: task 8833 -- steps 1 and 2
Date: Thu, 27 Nov 2008 20:13:43 +0100

Well, attached is a patch for steps 1 and 2 of this task, it does the
following:

 - Modifies the database schema.

 - Adds the Layer-5__DB_operation/Donation.php class (donations deserve
their own class too! ;))

 - Moves the donation-related methods from
Layer-5__DB_operation/Job_Offer.php to
Layer-5__DB_operation/Donation.php, taking into account the table
renaming.

 - Modifies the donation-related methods at
Layer-4__DBManager_etc/DB_Manager.php with calls to the methods of the
new class.


Is is also needed to modify the current database, for 7.4 version:

# su postgres

# psql gnuherds

= ALTER TABLE R1_Donations2JobOffersJoins RENAME TO
R1_Donations2JobOffers;

= ALTER TABLE R1_Donations2JobOffers ADD COLUMN R1_DonationMagic
varchar(512);

= ALTER TABLE R1_Donations2JobOffers ALTER COLUMN R1_DonationMagic SET
DEFAULT NULL;

= ALTER TABLE R1_Donations2JobOffers ADD COLUMN R1_DonationMagicExpire
timestamp;

= UPDATE R1_Donations2JobOffers set R1_DonationMagicExpire='now';

= ALTER TABLE R1_Donations2JobOffers ALTER COLUMN R1_DonationMagicExpire
SET NOT NULL;

= ALTER TABLE R1_Donations2JobOffers ALTER COLUMN R1_DonationMagicExpire
SET DEFAULT 'now';


Let me know if this works for you. If so we could go on with the next
steps:
 * 3: modify the addDonation method of the Donation class to allow
inserting registers with the values of R1_DonationMagic and
R1_DonationMagicExpire.

 * 4: modify getEntityId method of Layer-5__DB_operation/Entity.php to
create values of R1_DonationMagic and R1_DonationMagicExpire, call
addDonation and send verification email.

 * 5: create entry point for verify donation, cloning the entity
verification process.

 * 6: create a cronjob to delete expired donations.

What do you think?

Best regards
Federico

Attachment: diff.txt
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]