I have created a table “record_archives” using engine=archive in my
application to archive data for a table “records”. I want to insert
data into archived table at specific time, like once in a week. I have
created model for that table but not used any migration and directly
created a table using script. The script includes default value for id
is ZERO and Initially there is not a single entry in both tables.
When i creates a record using RecordArchive.create(:id=>rec.id, …),
it inserts ZERO into archive table even though i have passed an id
for that record.
And i am not sure why it doesn’t insert the value for id into archived
Please somebody can answer my question, How to insert the value for
id? Is there any other way to insert the actual value of ID? Do i need
to use any other way to insert the data into archived table as Rails
models may be using index and which is not supported in archive