Hi Roi,
Without more specifics it's impossible to say but most likely some sort of error with a SQL statement in your code, or in the install.xml.
You should read up on the Moodle Developer Documentation before attempting to create a plugin, and also look at the existing Totara and Moodle activity modules to see how the various files are structured, especially in the in the plugins /db folder which is where all the installation/upgrade code goes.
https://docs.moodle.org/28/en/Development:Developer_documentation