Advice with one-to-many identifying relationships

Hi I’m, new to Yii and database development and would be grateful with some help on a project I’m currently working on. I have created a class diagram for the objects in my application and have begun to use MySQL Workbench to model a small section of the database.

In my model I have a User table and a Membership table where a User through the process of cancelling their membership and then signing up again could have one or more Memberships. To represent this relationship I was simply going to place a foreign key in the Membership table that referenced the ID of the User. I was also going to set this column to NOT NULL to ensure that all Memberships had an associated User.

MySQL Workbench has the concept of a one-to-many identifying relationship that ensures that all Memberships have an associated User by making the primary key of the Membership table a composite of both the Membership ID and the User ID, which of the above approaches would you suggest for my scenario? If I create a Model in Gii, does YII’s ActiveRecord code generation work well with identifying relationships?